User-Agent parser
Every time a browser makes a request, it sends a User-Agent string — a line of text that names the browser, its version, the rendering engine and the operating system. This parser breaks any such string into those parts: browser, rendering engine, operating system and device type (desktop, mobile, tablet or bot). The box is pre-filled with your own browser’s User-Agent so you can see exactly what your device reports, and you can paste strings from logs or analytics to identify what generated each request.
Token-by-token parsing
Detection runs an ordered set of regular expressions against the string,
testing the most specific tokens before the generic ones. This ordering matters
because User-Agents deliberately overlap: a Chrome string also contains Safari,
and an Edge string also contains Chrome. By checking Edg/ before Chrome/,
and SamsungBrowser/ before plain Chrome/, the parser reports the most precise
match. It separately matches OS tokens (Windows, macOS, Android, iOS, Linux) and
device hints to classify the device.
Worked examples
iPhone on Safari:
Mozilla/5.0 (iPhone; CPU iPhone OS 17_0 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.0 Mobile/15E148 Safari/604.1
| Field | Detected |
|---|---|
| Browser | Safari 17.0 |
| Engine | WebKit |
| OS | iOS 17 |
| Device | Mobile |
Chrome on Windows:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36
| Field | Detected |
|---|---|
| Browser | Chrome 120.0 |
| Engine | Blink |
| OS | Windows 10 |
| Device | Desktop |
Note that this Chrome string includes both AppleWebKit and Safari tokens — the parser identifies Chrome/ as more specific and reports Chrome, while the engine is correctly identified as Blink (Chrome’s fork of WebKit).
Googlebot:
Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)
| Field | Detected |
|---|---|
| Browser | Googlebot 2.1 |
| Engine | — |
| OS | — |
| Device | Bot |
Why User-Agents are deliberately messy
The “Mozilla/5.0” prefix on almost every browser string is a historical artifact. When Netscape Navigator was the dominant browser in the 1990s, many web servers checked for “Mozilla” in the User-Agent before sending advanced features. Other browsers began including it for compatibility, and the convention stuck even though it is meaningless today.
Similarly, Chrome includes Safari/537.36 in its User-Agent because Chrome was originally built on WebKit (Safari’s engine) and kept the token for sites that sniffed for Safari. Edge includes Chrome/ in its string for the same compatibility reason. This layering of legacy tokens is why ordered, specific-first matching is necessary for any reliable parser.
Practical uses for developers and analysts
Log analysis: Web server logs record User-Agents for every request. Parsing them reveals what share of traffic comes from mobile versus desktop, which browsers are most common, and which requests are from bots or scrapers.
Testing: When QA teams test responsive layouts or browser-specific bugs, they may need to identify which User-Agent a device is sending to replicate an issue.
Bot detection: Security teams check User-Agents to identify known crawler signatures. This parser labels bot-keyword strings appropriately, though sophisticated bots can spoof a desktop browser User-Agent.
API clients: REST API logs often include client library User-Agents (like python-requests/2.31.0 or okhttp/4.11). Parsing these helps understand which integrations are calling your API and at what scale.
Everything runs in your browser; no string is sent to a server. Because User-Agents are self-reported and can be spoofed, treat the output as a best-effort interpretation rather than proof of the actual software.
The string is being phased down — plan accordingly
Chrome has already reduced its User-Agent string (freezing minor version numbers and dropping platform details), steering identification toward the structured User-Agent Client Hints API, and other browsers ship their own privacy-motivated simplifications. The practical rules this implies: never branch application features on UA parsing (use feature detection); treat parsed browser versions as approximate for analytics; and expect the OS-version and device tokens to get vaguer over time. The header’s grammar and history are documented in MDN’s User-Agent reference. UA parsing remains genuinely useful for log analysis, bot identification and debugging user reports — the cases where an honest approximation beats no signal — which is exactly what this tool is for.