💻 User Agent & Browser Inspector
A user agent analyzer for your own browser string: operating system, browser engine, version, screen resolution and device pixel ratio, parsed locally.
What User Agent & Browser Inspector Does
A user agent string is a line of text a browser sends with every request, and it is a historical accident held together by decades of compatibility hacks. Nearly every browser starts with "Mozilla/5.0", which has nothing to do with Mozilla and everything to do with 1990s servers that checked for it before serving modern pages.
That history makes parsing order-sensitive in a way that catches people out. Chromium-based Opera sends both "Chrome/" and "OPR/"; Edge sends "Chrome/" and "Edg/"; Samsung Internet sends "Chrome/" and "SamsungBrowser/". Test for Chrome first and all three become Chrome. The checks have to run most-specific first, which is the single most common bug in hand-rolled user agent parsing.
The string is also being deliberately reduced. Chrome now freezes the version numbers it reports and exposes the real values through User-Agent Client Hints instead, to make passive fingerprinting harder. Reading only the string means reading something the browser has intentionally made vague.
And some devices lie by design. Since iPadOS 13, Safari on an iPad requests desktop sites by default and sends a Macintosh user agent to match. Nothing in the string reveals it — the only reliable signal from script is that a Mac reports zero touch points and an iPad reports five.
How to Use User Agent & Browser Inspector
- View your automatically detected browser, operating system, and device type
- Inspect display resolution, Retina/HiDPI scaling, and browser language
Formula Used by User Agent & Browser Inspector
Anatomy of a user agent string
Mozilla/5.0 (platform) engine/version (compatibility) browser/version
- Mozilla/5.0
- vestigial; present on essentially every browser for historical compatibility
- platform
- operating system and sometimes architecture, in parentheses
- engine tokens
- AppleWebKit, Gecko, Blink — often several at once, again for compatibility
- browser token
- the part that actually identifies the browser, and usually the last one
Worked example
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36 OPR/112.0.0.0
- Claims Mozilla, AppleWebKit, KHTML, Gecko, Chrome and Safari
- The only token that identifies it is OPR/ at the end
- A parser checking Chrome before Opera reports this as Chrome
Result: Opera — but four of the six names in the string are there purely for compatibility.
Tokens that identify a browser, in the order they must be checked
Every Chromium fork also claims to be Chrome, so specific tokens have to win.
| Browser | Token | Also contains |
|---|---|---|
| Opera | OPR/ | Chrome, Safari, AppleWebKit |
| Vivaldi | Vivaldi/ | Chrome, Safari, AppleWebKit |
| Microsoft Edge | Edg/ | Chrome, Safari, AppleWebKit |
| Samsung Internet | SamsungBrowser/ | Chrome, Safari, AppleWebKit |
| Chrome for iOS | CriOS/ | Safari, AppleWebKit |
| Firefox | Firefox/ | Gecko |
| Chrome | Chrome/ | Safari, AppleWebKit |
| Safari | Version/ with Safari/ | AppleWebKit |
What the string cannot tell you
| Question | Why the string fails | What works |
|---|---|---|
| Is this an iPad? | iPadOS sends a Macintosh string | maxTouchPoints — a Mac reports 0, an iPad 5 |
| What Chrome version? | Frozen at a reduced value | User-Agent Client Hints |
| Windows 10 or 11? | Both send Windows NT 10.0 | Client Hints platformVersion |
| Is this a real user? | Trivially forged, one header | Behavioral signals, not headers |
| Screen size? | Not in the string at all | window.screen, after the page loads |
How to Read Your Result
Never use it as a security control
A user agent is a header the client chooses. Changing it takes one line of curl or one setting in developer tools. Anything that grants or denies access based on it is trivially bypassed, and blocking bots by user agent stops only the bots that were honest about being bots.
Feature-detect instead of browser-detect
Checking whether an API exists is both more accurate and more durable than checking which browser you think you are talking to. Browser sniffing breaks every time a new version ships or a new fork appears — and the compatibility tokens in these strings exist precisely because of thirty years of sites that sniffed badly.
The combination is a fingerprint
On its own a user agent identifies little. Combined with screen size, timezone, language, fonts and canvas rendering it frequently identifies one device out of millions, and none of it requires permission. That is what Client Hints and user agent reduction are trying to blunt.
Client Hints are the accurate source now
Where navigator.userAgentData exists, its values are the real ones and the string is the reduced one. If the two disagree, believe the hints. High-entropy values such as the exact platform version have to be requested explicitly, and the browser may decline.
Limitations & Accuracy Notes
- Parsing is heuristic. New browsers, forks and embedded web views appear constantly and will not all be recognized.
- Client Hints are Chromium-only at present; Firefox and Safari do not implement navigator.userAgentData.
- The iPad detection relies on touch points and cannot be applied to a pasted string, only to the browser you are using.
- Version numbers reported by Chromium browsers in the string are deliberately frozen and should not be relied on.
- Everything is read locally and nothing is transmitted — but every site you visit can read the same values without asking.
Frequently Asked Questions
What is a User-Agent string?
Why do developers analyze user-agent strings?
How reliable is user agent parsing?
Why does Chrome's user agent mention Mozilla, Safari and Gecko?
What should I use instead of user agent sniffing?
Can a user agent be faked?
Why does my phone report as a desktop?
Is my user agent recorded?
References & Further Reading
- MDN — User-Agent header — The structure of the string and why browser detection is discouraged
- MDN — User-Agent Client Hints API — The replacement mechanism, and the high-entropy values that must be requested