Skip to content
ToolBoxGeniehome

User Agent Parser

Developer Tools · Added

A user-agent string is thirty years of compatibility sediment. Every browser calls itself Mozilla, every WebKit browser claims to be “like Gecko”, and every Chromium browser claims to be Chrome and Safari at once. This reads one properly — specific claims before the generic ones they hide behind — and is equally clear about what the string genuinely cannot tell you.

Paste one from a server log, a request header or a browser console.

What this string says

Browser
Chrome 126.0.0.0
Engine
Blink 537.36
Operating system
Windows 10 or 11
Device
Desktop

Tokens

Product 1
Mozilla/5.0
Comment 2
Windows NT 10.0; Win64; x64
Product 3
AppleWebKit/537.36
Comment 4
KHTML, like Gecko
Product 5
Chrome/126.0.0.0
Product 6
Safari/537.36

What it does not tell you

  • Starts with Mozilla/5.0. Nothing here is Netscape — every browser has claimed to be it since servers began checking for the name in the 1990s, so the token carries no information at all.
  • "like Gecko" is a compatibility claim, not the engine. This browser does not use Gecko; the phrase is there so code testing for Firefox's engine does not fall over.
  • The trailing Safari/ token does not mean Safari. Chrome keeps it, and the Chrome/ token, so that older sniffing code recognises the browser.
  • Windows 11 reports itself as Windows NT 10.0, exactly as Windows 10 does. The string genuinely cannot tell the two apart — only the Sec-CH-UA-Platform-Version client hint can.
  • Chrome's minor version fields are hard-coded zeros. Since the 2022 UA reduction only the major version is real, and the platform and device fields were frozen at the same time.
  • Some privacy browsers, Brave and DuckDuckGo among them, deliberately send an unmodified Chrome or Safari string. A UA reading as plain Chrome is not proof that it is Chrome.

The string is parsed in this tab against a table of known tokens — nothing is looked up and nothing is sent anywhere. Any client can send any string, so treat every claim here as reported rather than verified.

How to use the user agent parser

  1. 1Paste a user-agent string from a server log, a request header or a browser console.
  2. 2Or press the button to read the string this browser is sending right now.
  3. 3Read the browser, engine, operating system and device it reports.
  4. 4Check the token list and the caveats below it before you act on any of it.

Examples

Chrome on a Windows desktop

Input
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36
Result
Chrome 126.0.0.0 · Blink · Windows 10 or 11 · Desktop, from six tokens

The version cannot be narrowed past 126, and the operating system cannot be narrowed at all.

Samsung Internet on a phone

Input
… Chrome/119.0.0.0 Mobile Safari/537.36 SamsungBrowser/23.0
Result
Samsung Internet 23.0 · Blink · Android 13 · Phone

Read left to right this string says Chrome. The SamsungBrowser token at the end is the real answer.

A crawler

Input
Mozilla/5.0 (compatible; bingbot/2.0; +http://www.bing.com/bingbot.htm)
Result
Bingbot 2.0 · Crawler — with a reminder that any client can send any string

About the user agent parser

Why the order of the tokens matters more than the tokens

The single thing that makes user-agent parsing hard is that the specific claim always sits after the generic one it is hiding behind. Edge appends Edg/126 to a string that already says Chrome. Opera appends OPR/106. Samsung Internet appends SamsungBrowser/23. Each of them does this deliberately, so that code testing for Chrome finds Chrome and does not serve them a degraded page.

A parser that scans left to right therefore reports Chrome for at least four different browsers. The rule is to test the most specific pattern first and stop at the first match, which is exactly what this tool does — and it is why the token list sits alongside the verdict, so you can see the evidence rather than take the answer on trust.

What the string has stopped telling you

Chrome's user-agent reduction, rolled out through 2022 and 2023, froze most of the string. The minor version fields are hard zeros, the platform version no longer increments, and the device model on Android is reported as a generic value. Firefox and Safari have made comparable reductions. The direction of travel is that the string identifies a browser family and a major version, and nothing finer.

The replacement is User-Agent Client Hints: a set of Sec-CH-UA headers a site requests explicitly and the browser may decline. That shift is why the useful output of a parser today is as much the list of caveats as the list of fields — a log full of Windows NT 10.0 does not tell you how many of your visitors are on Windows 11, and no amount of parsing will make it.

Reading a log without fooling yourself

Three habits make user-agent data more honest. Count crawler traffic separately, because a few busy bots can outweigh every real visitor in a small log. Treat unknown strings as a category rather than discarding them; a sudden rise in unrecognised agents is usually the first sign of a scraper. And never draw a conclusion about market share from a sample of one site.

Privacy browsers add a further wrinkle: several of them, Brave and DuckDuckGo among them, send a completely ordinary Chrome or Safari string by design. The point is to be indistinguishable, and it works — which means a log reading as plain Chrome is a floor for Chrome, not a measurement of it.

Frequently asked questions

Why is my Windows 11 machine reported as “Windows 10 or 11”?
Because Windows 11 sends Windows NT 10.0, the same token Windows 10 sends. Microsoft froze it to avoid breaking version checks that assumed the number would keep counting. No parser can separate the two from the string alone; only the Sec-CH-UA-Platform-Version client hint carries the real number.
Why does every browser claim to be Mozilla?
In 1994 servers checked for the token Mozilla before sending frames-capable pages, so competing browsers started claiming it. Every layer since has been added the same way: Internet Explorer claimed to be Mozilla, Chrome claimed to be Safari, Edge claims to be Chrome. The leading Mozilla/5.0 now carries no information whatsoever.
Can I trust this to identify Googlebot?
No, and neither can your server. A user-agent string is self-reported, so anyone can send Googlebot's. Google's own guidance is to verify a crawler by running a reverse DNS lookup on the requesting IP address and confirming it resolves into googlebot.com or google.com, then a forward lookup back to the same address. Treat the string as a claim.
Why is Chrome on iPhone shown as running WebKit?
Because it is. Until recently every browser on iOS and iPadOS was required to use the system WebKit engine, so Chrome, Firefox and Edge on those platforms are interfaces over the same renderer. The CriOS or FxiOS token tells you which interface; it does not tell you which engine, because there was only one.
Should I use this for feature detection in code?
No. Test for the feature, not the browser — asking whether an API exists survives a browser update, while asking whether this is Chrome 126 does not. Parsing the string is the right tool for reading logs, reproducing a bug report and spotting crawler traffic, and the wrong tool for deciding what your code does.