User-Agent Parser
Classify a User-Agent string into browser, engine, operating system, device class and bot flag.
- Runs locally in your browser
- No upload required
Try it
Supported formats
Privacy
Runs entirely in your browser. Your input is never uploaded, stored, or sent to a third party.
Classified the string as Chrome on Windows (desktop).
How it works
- Scanned the string against the bot rules first and returned early on a bot match.
- Matched the browser/engine rules and selected Chrome / Blink.
- Matched the operating-system rules and selected Windows.
- Derived the device class desktop from the platform and mobility tokens.
- An unrecognised string yields "other" for browser, engine, OS and device; the tool never guesses.
- The rule table is bounded and documented; it is not a complete third-party User-Agent database.
Methodology
- Scan for bot tokens first; a match sets the bot flag and the device class bot and ends classification.
- Match browser/engine rules in specificity order: Edge, Opera, Samsung Internet, Chrome/Chromium, Firefox, Safari, then curl.
- Match operating-system rules: Windows, iOS, Android, macOS, ChromeOS, Linux.
- Derive the device class from tablet and mobility tokens, defaulting to desktop for a recognised platform.
- Return "other" for any dimension the table did not match and record the matched rule identifiers.
Usage
- Paste a User-Agent string, or read one from the HTTP Header Parser.
- Run the tool.
- Read the browser, engine, OS, device class and bot flag, and check the matched rules.
Examples
These are examples, not current values: they use fixed inputs, while the interactive tool computes live results in your browser.
Chrome on Windows
{
"text": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36"
}Safari on an iPhone
{
"text": "Mozilla/5.0 (iPhone; CPU iPhone OS 17_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.4 Mobile/15E148 Safari/604.1"
}Googlebot
{
"text": "Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)"
}Limitations
Why classification is heuristic
User-Agent strings were never a stable, machine-readable format. Browsers keep historical tokens for compatibility, so a Chrome string still contains Mozilla, AppleWebKit and Safari. The table therefore orders rules from the most specific to the most general and reports the rule identifiers it used, so you can see exactly why a string was classified a particular way.
Using the result responsibly
Treat the classification as a hint for presentation and analytics, not as a gate. Bots, privacy tools and scripts can present any string, and a human on a tablet may present a desktop token. If a feature genuinely depends on a capability, detect the capability rather than the User-Agent.
Frequently asked questions
- Can I trust the User-Agent to tell me the real browser?
- No. The header is self-declared and trivially spoofed. Use it for analytics and graceful degradation, never for security decisions or access control.
- Why did my client come back as "other"?
- The bounded rule table did not match a known family. That is intentional: reporting "other" is honest, while guessing a family from a partial token would not be.
- Is my User-Agent sent anywhere?
- No. Classification runs entirely in your browser and the string is never collected or transmitted.
Sources
Send feedback
Tell us if this tool helped, report a problem, or suggest a tool. Only the message you type is sent — never the input you used in the tool.
Was this tool useful?
Prefer to write to us directly? See the contact page.