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

Paste a User-Agent string. Classification runs in your browser and nothing is sent.

Browser
Chrome
Engine
Blink
Operating system
Windows
Device class
desktop
Bot
no
Matched rules
chrome, windows
{
  "browser": "Chrome",
  "engine": "Blink",
  "os": "Windows",
  "device": "desktop",
  "bot": false,
  "matched": [
    "chrome",
    "windows"
  ]
}

Supported formats

Input
text
Output
text, json

Privacy

Runs entirely in your browser. Your input is never uploaded, stored, or sent to a third party.

Processing
In your browser
Privacy level
Browser only

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

  1. Scan for bot tokens first; a match sets the bot flag and the device class bot and ends classification.
  2. Match browser/engine rules in specificity order: Edge, Opera, Samsung Internet, Chrome/Chromium, Firefox, Safari, then curl.
  3. Match operating-system rules: Windows, iOS, Android, macOS, ChromeOS, Linux.
  4. Derive the device class from tablet and mobility tokens, defaulting to desktop for a recognised platform.
  5. Return "other" for any dimension the table did not match and record the matched rule identifiers.

Usage

  1. Paste a User-Agent string, or read one from the HTTP Header Parser.
  2. Run the tool.
  3. 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

jsonSelect to copy
{
  "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

jsonSelect to copy
{
  "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

jsonSelect to copy
{
  "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

  1. RFC 9110 — HTTP Semantics (User-Agent) — IETF
  2. MDN Web Docs — User-Agent — MDN