View and parse your browser's User-Agent string
Browser and OS detection is based on matching common patterns in the User-Agent string. It covers the vast majority of mainstream browsers and systems, but isn't guaranteed to precisely identify every niche browser or unusual device.
The User-Agent Detector reads the User-Agent string your current browser sends, shows it exactly as it is, and uses a small set of rules to identify the browser, operating system and device type (mobile or desktop). It only inspects the browser you are using right now. You cannot paste someone else's string into it, and it cannot change or spoof your UA. The detection is a few lines of pattern matching, a rough but useful guess rather than a full UA-parsing library.
The browser is decided in order: Edg/, EdgA/ or EdgiOS/ means Microsoft Edge, then OPR/ means Opera, then Chrome/ or CriOS/ means Google Chrome, Firefox/ or FxiOS/ means Mozilla Firefox, and Safari/ without Chrome/ means Safari. The OS is checked as Windows NT, then Mac OS X (excluding iPhone and iPad; a Macintosh string with multi-touch is treated as iPadOS and shown as iOS), then iPhone/iPad, Android, CrOS (ChromeOS) and finally Linux. Anything containing Mobile, Android, iPhone or iPad, or detected as iPadOS, counts as a mobile device. We ran these rules on a few typical strings: Chromium-based Edge on Windows with Edg/ gave Microsoft Edge, Windows, Desktop; Safari on an iPhone gave Safari, iOS, Mobile; Firefox on Linux gave Mozilla Firefox, Linux, Desktop; and Chrome on a Pixel phone gave Google Chrome, Android, Mobile.
It is historical compatibility. Early websites used the UA to decide whether to serve full features, so later browsers added Mozilla, AppleWebKit and Safari tokens to avoid being excluded. That is why the tool must test for Edg/, OPR/ and Chrome/ before it can test for Safari.
Only as a hint. Modern front-end practice favours feature detection and responsive layouts over branching by UA. UA detection is handy for quickly confirming the environment of yourself or a user, for instance when passing details to a developer.
Most likely it is one of the cases in the limits above. Copy the full string and look for keywords to work out what it really is.
No. It only reads navigator.userAgent from the current browser, and the page has no input box.
The User-Agent is read by your browser and shown only on your page. The code makes no request that sends it to a server and does not store it. Note that your browser already sends its UA to every website you visit along with each request, so it is not secret, though you may still want to think before sharing it with others.