User-Agent Parser
Parse and decode browser User-Agent strings into browser, OS, device, and rendering engine.
Written by Anil Gautam · Updated
How does the parser read a user-agent string?
Most user-agent strings name several browsers, because newer browsers copied older tokens to stay compatible with sites that checked for them. Chrome on Windows sends Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/129.0.0.0 Safari/537.36, which mentions Mozilla, Gecko and Safari as well as Chrome. The parser looks for tokens in a fixed order: EdgiOS/ and Edg/ for Edge, OPR/ for Opera, FxiOS/ and Firefox/, CriOS/ and Chrome/, Safari/ together with Version/, and finally MSIE or Trident for Internet Explorer. Checking stops at the first match, so Edge and Opera are caught before their Chrome token.
For that string the result is Chrome 129.0.0.0, Windows 10/11, Desktop and Blink. Engine is read separately: Gecko for Firefox, WebKit when AppleWebKit appears without Chrome/, Blink for Chrome/ or Chromium/, and Trident for old Internet Explorer. Device stays Desktop unless the string names an iPhone, iPad or Android. An Android string with the Mobile token counts as a phone, and one without it as a tablet.
Why do some versions look vague or frozen?
Browsers now leave detail out on purpose. Windows 11 still reports Windows NT 10.0, so the tool can only say 10/11. Safari and Chrome on a Mac report Mac OS X 10_15_7 whatever macOS version is installed. Google Chrome also sends a reduced string in which only the major version is real, as in Chrome/129.0.0.0, and on Android it reports Android 10; K in place of the real version and model. The parser shows what the string says, so a current Chrome on any Android phone appears as Android 10.
Chromium browsers expose exact versions through User-Agent Client Hints, which this tool does not read. Since iPadOS 13, Safari on an iPad sends a Mac string by default, and the tool reports a Mac desktop. iPhone strings contain the phrase like Mac OS X, so the parser checks for iPhone and iPad first and reports iOS with its version.
Which browsers and bots does it misread?
Brave sends the same string as Chrome, and Samsung Internet's own token is not checked, so both show as Chrome. Chrome, Firefox and Edge on iPhone identify themselves with CriOS/, FxiOS/ and EdgiOS/, which the parser reads, while the engine field shows WebKit because every iPhone browser runs on Apple's engine. Crawlers that copy a Chrome string, such as Googlebot's smartphone agent, show as Chrome on Android, so search the raw text for a bot name yourself. Parsing happens in the page, and pasted strings are not uploaded.