User Agent Parser
Parse and detect browser, OS, device type, and engine from any user agent string. Auto-detects your current browser.
A user agent parser breaks a browser's User-Agent HTTP header into structured fields: browser name and version, operating system, device type, and rendering engine. This tool auto-detects your current browser through the navigator.userAgent property and parses any pasted UA string entirely client-side. Useful for debugging server logs, testing analytics pipelines, identifying crawlers, and confirming what headers your browser actually sends.
About User Agent Parser
What the Parser Detects
Five properties are extracted by matching well-known tokens in the UA string against regular expressions.
| Property | Examples | How It Is Detected |
|---|---|---|
| Browser | Chrome, Firefox, Safari, Edge, Opera, Brave, Vivaldi | Specific tokens in the UA string (Chrome/, Firefox/, Edg/) |
| Browser version | 124.0.6367.91 | Version number after the browser token |
| Operating system | Windows 11, macOS 15, Ubuntu, Android 14, iOS 17 | Platform tokens (Windows NT, Mac OS X, Linux) |
| Device type | Desktop, mobile, tablet, bot | Mobile keyword, tablet keywords, bot signatures |
| Rendering engine | Blink, WebKit, Gecko | AppleWebKit/, Gecko/, Trident/ tokens |
Worked Example: Parsing a Chrome-on-Windows String
Take the following real UA string: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36.
Step 1, browser detection. The parser looks for Edg/ first (Edge impersonates Chrome, so Edge must win), then OPR/, Firefox/, Safari/ without Chrome/, and finally Chrome/. The string contains Chrome/124.0.0.0 and no Edg/ or OPR/, so the result is Chrome 124.0.0.0.
Step 2, OS detection. Windows NT 10.0 maps to Windows 10 or 11. Microsoft kept Windows NT 10.0 for Windows 11 rather than bumping it to 11, so the parser reports "Windows 10/11" and servers that need the distinction must use the Sec-CH-UA-Platform-Version client hint.
Step 3, engine. AppleWebKit/537.36 combined with Chrome/ means Blink (Chromium's fork of WebKit). AppleWebKit alone, without Chrome, means real WebKit (Safari).
Step 4, device. No Mobile or Android token, no bot signature, so the device is Desktop. Final parsed output: Chrome 124, Windows 10/11, Blink, Desktop.
Now try a tricky one: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36 Edg/124.0.2478.67. This is Edge, not Chrome. A parser that checks Chrome/ first would misreport it. The rule is: check the most specific brand first (Edg, OPR, Vivaldi, Brave, then Firefox, then Safari-without-Chrome, then Chrome as the fallback). The regex order in this tool's source follows that rule exactly.
A third example from an iPhone: 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 iPhone token sets the device to Mobile, iPhone OS 17_2 becomes iOS 17.2 (underscores swapped for dots), and Safari wins the browser check because the string does not contain Chrome/. Apple uses underscores in OS versions because dots break old regex patterns, so parsers must normalise them back.
Why User Agent Strings Are So Long
Modern UA strings carry decades of compatibility baggage because every new browser had to pretend to be the previous dominant one to avoid being served degraded content. The Chrome string above references Mozilla, WebKit, KHTML, Gecko, and Safari - five different product names for one browser.
| Year | What Happened |
|---|---|
| 1993 | Mosaic shipped as the first graphical browser. Servers started checking for "Mozilla" to send advanced content to Netscape users. |
| 1995 | Internet Explorer declared itself "Mozilla/compatible" so servers would not block it. |
| 2003 | Safari (WebKit) added "KHTML, like Gecko" so Gecko-targeted sites would work in WebKit. |
| 2008 | Chrome added "Safari" and "AppleWebKit" to its UA so WebKit-targeted sites served Chrome properly. |
| 2019 | Edge switched to Chromium and added both "Chrome" and "Safari" tokens. |
| 2022+ | Chrome began User-Agent Reduction - freezing minor version numbers and unifying OS version detail to reduce fingerprinting. |
Each new browser inherited the previous one's claims rather than dropping them, because thousands of legacy sites still key detection off old strings. The string is effectively a fossil record of browser history.
What Is the Current Browser Market Share?
Chrome sits at 71.37% global share in 2026, according to Statcounter Global Stats, followed by Safari at 14.75%, Edge at 4.65%, and Firefox at 2.25%. On desktop Chrome pushes past 76% and Edge takes second at roughly 9%. On mobile Chrome holds 64.7% while Safari dominates iOS traffic. Because four of the top five browsers (Chrome, Edge, Opera, Samsung Internet) run Blink, roughly 70%+ of real-world traffic originates from a Chromium-family engine.
| Engine | Browsers | UA Token Signature | Approx. 2026 Share |
|---|---|---|---|
| Blink | Chrome, Edge, Opera, Brave, Vivaldi, Samsung Internet | AppleWebKit/537.36 + Chrome/ | ~78% |
| WebKit | Safari (macOS and iOS), all iOS browsers pre-iOS 17.4 | AppleWebKit/ without Chrome/ | ~15% |
| Gecko | Firefox, Tor Browser | Gecko/ + Firefox/ | ~2-3% |
On iOS, until iOS 17.4 in March 2024, Apple's App Store guidelines forced all browsers to use WebKit under the hood. Chrome on iOS was a WebKit browser with Chrome's UI. In the EU, iOS 17.4 opened the door to non-WebKit engines under the Digital Markets Act, though adoption has been slow.
Common Bot and Crawler User Agents
Most bots identify themselves honestly in the UA header because search engines and AI crawlers want webmasters to allow or block them deliberately via robots.txt. Here are the signatures to recognise.
| Bot | Owner | UA Contains | Purpose |
|---|---|---|---|
| Googlebot | Googlebot/ | Web crawling for Google Search index | |
| Bingbot | Microsoft | bingbot/ | Bing search index (also feeds ChatGPT web results) |
| GPTBot | OpenAI | GPTBot/ | Training data collection for GPT models |
| ClaudeBot | Anthropic | ClaudeBot | Training data collection for Claude models |
| PerplexityBot | Perplexity | PerplexityBot | Answer engine crawling |
| DuckDuckBot | DuckDuckGo | DuckDuckBot/ | DuckDuckGo search crawling |
| Twitterbot | X / Twitter | Twitterbot/ | Fetching link preview cards |
| facebookexternalhit | Meta | facebookexternalhit/ | Fetching Open Graph previews for Facebook and Messenger |
Malicious scraping bots typically forge a real browser's UA string to blend in. UA-based blocking alone is not a security control - rate limiting, TLS fingerprinting (JA3/JA4), and behavioural analysis catch far more. If you are writing server-side detection for legitimate traffic, the HTTP Status Codes reference pairs well with UA analysis for understanding what your server is returning to each crawler.
Client Hints - The Modern Alternative
User-Agent Client Hints (UA-CH) replace UA parsing with structured HTTP headers the browser sends only when the server asks for them, per the W3C WICG specification. The server opts in by sending an Accept-CH response header listing which hints it wants, and the browser includes those hints on subsequent requests.
| Client Hint | Returns | Example Value |
|---|---|---|
| Sec-CH-UA | Browser brand and major version | "Chromium";v="124", "Google Chrome";v="124", "Not-A.Brand";v="99" |
| Sec-CH-UA-Mobile | Is this a mobile device? | ?0 (no) or ?1 (yes) |
| Sec-CH-UA-Platform | Operating system | "Windows" |
| Sec-CH-UA-Platform-Version | OS version (high entropy) | "15.0.0" |
| Sec-CH-UA-Arch | CPU architecture (high entropy) | "x86" or "arm" |
| Sec-CH-UA-Model | Device model (high entropy) | "Pixel 8" |
| Sec-CH-UA-Full-Version-List | Full version of every brand (high entropy) | "Chromium";v="124.0.6367.91" |
Chrome began User-Agent Reduction in Q2 2022 (starting with Chrome 101) and completed it across all platforms by 2023. The traditional UA string still works but now returns a frozen minor version and a unified OS version. For example, every Chrome user on Windows now reports Windows NT 10.0 regardless of whether they run Windows 10 or 11. To get the real OS version, servers must request Sec-CH-UA-Platform-Version explicitly. Firefox and Safari have not implemented UA-CH as of 2026 and continue to rely on the traditional string.
Reading a UA String Token by Token
Every modern UA string follows the same top-level structure: Mozilla/5.0 (platform info) engine (compatibility note) browser-and-version. Knowing the layout makes manual inspection faster when regex libraries are overkill.
| Token | Meaning | Present In |
|---|---|---|
| Mozilla/5.0 | Legacy Netscape-era product token. Universal. | Chrome, Firefox, Safari, Edge, Opera |
| (Windows NT 10.0; Win64; x64) | Platform comment - OS, bitness, CPU architecture | All desktop browsers |
| AppleWebKit/537.36 | Rendering engine version | Chromium, Safari |
| (KHTML, like Gecko) | Engine compatibility claim from WebKit's KHTML heritage | Chromium, Safari |
| Chrome/124.0.0.0 | Actual browser and version | Chrome, Edge, Opera, Brave |
| Safari/537.36 | Safari compatibility token, same version as WebKit | Chromium family |
| Mobile | Mobile device hint for CSS and server-side detection | Android phones, iPhone |
| Edg/124.0.0.0 | Edge-specific token, placed after Chrome for compatibility | Microsoft Edge only |
For regex-based parsing or writing your own matcher, the Regex Tester is the fastest way to validate each pattern against the real UAs in your access logs.
Common Parsing Mistakes
The biggest mistake is checking for Chrome before Edg or OPR. Edge and Opera both contain Chrome/ in their UA strings, so naive code misidentifies them. Always check for the more specific brand first. The second mistake is treating Safari/ as evidence of Safari - Chrome includes Safari/537.36 for historical compatibility, so Safari detection must check for Safari/ AND NOT Chrome/.
A third pitfall: on iOS pre-17.4, every browser reports the same WebKit UA with minor variations, so Chrome on iPhone looks almost identical to Safari on iPhone. Device-specific feature detection (via navigator properties or the Screen Resolution Checker) is more reliable than UA parsing when precise browser identity matters.
Sources
Frequently Asked Questions
What is a user agent string?
A user agent string is a text string that your browser sends to web servers with every request. It identifies the browser name and version, operating system, device type, and rendering engine. Servers use this information to tailor responses.
Can I parse a custom user agent string?
Yes. Paste any user agent string into the text area and the tool will parse it to show the browser, OS, device type, and engine. This is useful for debugging requests or analysing log files.
How accurate is user agent detection?
User agent strings follow common patterns that are well understood. This parser reliably identifies major browsers (Chrome, Firefox, Safari, Edge, Opera), operating systems (Windows, macOS, Linux, Android, iOS), and bots like Googlebot. Some niche browsers may show as their parent engine.
Why do user agent strings look so complicated?
For historical compatibility reasons, most browsers include references to other browsers in their user agent string. Chrome includes Safari and Mozilla references, for example, so that servers that check for those strings still serve modern content.
Is this tool private?
Yes. Your user agent string is parsed entirely in your browser. Nothing is sent to any external server.
Related Tools
Link to this tool
Copy this HTML to link to this tool from your website or blog.
<a href="https://toolboxkit.io/tools/user-agent-parser/" title="User Agent Parser - Free Online Tool">Try User Agent Parser on ToolboxKit.io</a>