What is a user agent parser?
A user agent parser reads a user-agent string — the line a browser sends with every request — and tells you the browser, its version, the operating system, and the device. The default string is a Chrome browser on Windows 10, and the parser reports "Chrome 120" on "Windows 10" as a "Desktop" device.
User-agent strings are how the web knows what is visiting. A server log, an analytics report, or a bug report all carry them, and each one is a long line of tokens that looks like noise until it is parsed. A parser turns the line into three facts a human can read.
This tool is different from the user agent checker on this site, which shows your own browser's user-agent string. Use the checker to see what your browser sends, and this parser to decode a string someone else sent you — from a log, a ticket, or an analytics export.
How user agent parsing works
The parser matches tokens in order. The browser is checked first: Edg/ means Edge, OPR/ means Opera, Chrome/ means Chrome, Firefox/ means Firefox, and a Version/ followed by Safari means Safari. The order matters, because Chrome's string also contains Safari — checking Chrome first is what stops a Chrome string from being read as Safari.
The operating system is checked next. Windows NT 10.0 means Windows 10, Mac OS X 10_15 means macOS 10.15, Android 13 means Android 13, and an iPhone token with OS 17_2 means iOS 17.2. The version is read from the token and shown with dots instead of underscores.
The device type is the last check: if the string contains Mobi, Android, iPhone, or iPad, the device is Mobile; otherwise it is Desktop. A tablet such as an iPad reads as Mobile, because its string carries the iPad token — which is the honest answer for a device that is neither a phone nor a desktop.
The browser token, explained
Every browser's user-agent string starts with Mozilla/5.0, which is a historical accident from the browser wars — every browser claims to be Mozilla for compatibility, so the first token tells you nothing. The real browser token comes later in the string, and it is the one the parser reads.
Chrome's string contains both Chrome/120.0.0.0 and Safari/537.36, because Chrome is built on the same engine lineage as Safari. A parser that checks Safari first would call every Chrome user a Safari user, which is why the order is Edge, Opera, Chrome, Firefox, then Safari.
The version shown is the major version — Chrome 120, not 120.0.0.0 — because the major version is what matters for compatibility. A site that needs to know whether a browser supports a feature checks the major version, and the full version is in the string for anyone who needs it.
The browser token is the part of the string that names the browser, and it is the last token that matters rather than the first. A Chrome string contains the words Chrome and Safari, because Chrome's string was built to look like Safari's for compatibility, and a string that only looked for Safari would call Chrome Safari. The parser checks the tokens in order — Edge first, then Opera, then Chrome, then Firefox, then Safari — so the most specific token wins. That order is the whole trick of user agent parsing, and it is why a simple search for a browser name gives the wrong answer.
A worked example: a Chrome string
Take the default string: "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36". The parser finds Chrome/120.0.0.0 and reports "Chrome 120". It finds Windows NT 10.0 and reports "Windows 10". There is no Mobi token, so the device is "Desktop".
Try an iPhone string: "Mozilla/5.0 (iPhone; CPU iPhone OS 17_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.2 Mobile/15E148 Safari/604.1". The parser finds Version/17.2 with Safari and reports Safari 17, finds OS 17_2 and reports iOS 17.2, and finds iPhone and reports Mobile.
Try a Firefox string on Linux: "Mozilla/5.0 (X11; Linux x86_64; rv:121.0) Gecko/20100101 Firefox/121.0". The parser finds Firefox/121.0 and reports Firefox 121, finds Linux and reports Linux, and finds no mobile token, so the device is Desktop.
Who uses a user agent parser, and why
Developers debugging a bug report are the main users. A user reports a problem, and the report includes their user-agent string. Parsing it tells the developer the browser and the OS in one glance, which is often enough to reproduce the bug — a Safari-only layout issue, or a Windows-only font problem.
Analysts are the second group. A server log is a list of user-agent strings, and parsing them turns the list into a browser share: how many visitors use Chrome, how many use Safari, how many are on mobile. That share decides what to test and what to support.
Support staff are a third group. A customer who cannot log in may be on an old browser, and the user-agent string is the evidence. A user agent checker shows your own string, which is what a support agent asks a customer to paste into a ticket.
Web analysts are a third group. A site's traffic report is built from the user agent strings in the server log, and the report needs to know how many visitors used Chrome, how many used a phone, and how many used an old browser that the site no longer supports. The parser is the tool for reading one string by hand, when a single visitor's string looks odd and the report needs an explanation. The bulk of the analysis is done by software, but the odd string is checked by hand.
User agent parser vs user agent checker
A parser decodes a string; a checker shows your own. The user agent checker on this site displays the user-agent string your browser is sending right now, which is useful when you need to know what you are. This tool takes any string — from a log, a ticket, or an export — and decodes it, which is useful when you need to know what someone else was.
The two tools share the same parsing rules, so they agree: your own string in the checker parses to the same browser and OS here. That consistency is the test that the parser is correct.
A HTTP status checker is the next tool in the chain: it fetches a URL and reports the status code, which is the other half of what a server log records alongside the user-agent string. and a DNS checker resolves the domain when the string comes from a server that could not be reached.
A parser is not a checker, and the distinction matters when the question is whether a string is real. A parser reads a string you already have and tells you what it claims, which is the tool for a string from a log or a bug report. A checker fetches a fresh string from the browser you are using, which is the tool for finding out what your own browser sends. Use the parser to read and the checker to fetch — the two tools answer different questions about the same string.
Common user agent parsing mistakes
The first mistake is reading the first token. Every user-agent string starts with Mozilla/5.0, which means nothing — it is a compatibility token from the 1990s. The real browser token comes later, and a parser that reads the first token calls every browser Mozilla.
Second: checking Safari before Chrome. Chrome's string contains Safari/537.36, so a parser that looks for Safari first reports every Chrome user as Safari. The order is Edge, Opera, Chrome, Firefox, then Safari — and the order is the fix.
Third: trusting the user-agent string completely. Any client can send any string, so a user-agent string is a claim, not a proof. A bot can claim to be Chrome, and a browser in privacy mode can send a reduced string. Use the parsed result as a hint, and confirm it with feature detection when the decision matters.
Fourth: forgetting that user-agent strings change. Browsers are reducing the detail in user-agent strings for privacy, and Chrome's plan is to freeze the version and the OS detail. A parser that depends on the full version may get less detail in future — the major version and the OS family are the parts that will stay.
A second mistake is trusting the user agent string to tell the truth. Any client can send any string, and bots, scrapers, and privacy tools routinely send a string that claims to be a common browser. The parser reports what the string says, not what the client is, and a string that says Chrome may have come from a script. The string is useful for statistics and for working around browser quirks, but it is not a way to identify a user, and it must never be the only check for anything that matters.
How to use this user agent parser
Paste a user-agent string into the box — the default is a Chrome string on Windows 10, which parses to "Chrome 120" on "Windows 10". The browser, the OS, and the device type update live above the output box, with the full parsed result in the box below.
To copy the result, use the Copy button next to the output box. To see your own string, use the user agent checker, then paste the string it shows into this tool.
Everything runs in your browser. No sign-up, no account, no data sent anywhere — your string never leaves your device. It works offline once the page has loaded.
Paste the user agent string and the result appears at once, with the browser, the version, the operating system, and the device type shown underneath. The browser name is the headline, and the version is the number after it — a Chrome version of 120 means the browser is Chrome 120, which is the detail a bug report needs. To check a string from a server log, paste it exactly as the log recorded it, including the slashes and the parentheses, because the parser reads the whole string.