User-Agent Parser

Network

Parse User-Agent strings into browser, OS and device info with Chrome, Firefox and Safari detection, and flag likely bots for cleaner traffic and log analysis.

Parse User-Agent strings · browser, OS, device
Valid
UAUser-Agent String
Browser
Chrome · 120.0.0.0
Engine
Blink
Operating System
Windows 10 · 10.0
Device
Desktop
CPU Architecture
amd64
Sample User-Agents

About User-Agent Parser

The User-Agent string a browser sends crams the OS, browser, engine, and device into one long line that's hard to read. This tool parses UA strings locally in your browser, identifying browser name and version, rendering engine, operating system, and device type — useful for analyzing access logs, debugging compatibility issues, or auditing analytics. For example, pasting a Chrome UA string identifies the browser, version, OS and device type without reading fields by hand. Extracting browser, operating system and device from a user agent string is the first step in diagnosing "only some users see this" problems: confirming the affected user's platform and browser usually narrows the scope immediately. It also feeds traffic statistics and compatibility decisions, though the two uses tolerate very different error rates, the first accepting vagueness and the second demanding caution. Parsing matches rules against characteristic fragments: browser identifiers normally appear as a name, a slash and a version, platform identifiers sit in the parenthesised description, and device information comes from the model string inside those parentheses. Rule matching is inherently heuristic, so two kinds of error exist, false positives from colliding fragments and failures on models no rule covers yet. That is what makes the result a reasoned inference rather than an authoritative statement. Practical notes: Identify platform and browser from the specific to the general, checking a vendor-specific newer identifier before a generic engine identifier, or a current browser is classified as an older sibling. Likewise, mobile and desktop variants of one browser look alike and need the platform description to disambiguate. Before running statistics over logs, validate the rules against a handful of known real samples, which costs less than discovering the problem across the whole dataset. Limits: The user agent string is supplied by the client and can be fabricated freely, so it must never drive security decisions, authorization or risk scoring, and treating it as a trusted identity is a common architectural mistake. Its format has changed repeatedly, and some browsers freeze version information to reduce fingerprinting, which protects privacy while lowering statistical precision, so compatibility logic should allow tolerance rather than branching on exact versions. Data and privacy: a full user agent string combined with other signals forms a fairly strong device fingerprint and counts as personal information. This tool parses in the browser without uploading the string; when processing real logs, keep only the fields a decision needs instead of retaining the complete string long term. The main misuse is driving authorisation, risk scoring or feature flags from the parse result: the user agent string is supplied by the client and freely forgeable, so treating it as a trusted identity is an architectural mistake. Another is branching on exact version numbers, while some browsers freeze version information to reduce fingerprinting, so hard branches misjudge. Allow tolerance and cross-check with other signals.

How It Works Internally

Parsing matches rules against characteristic fragments, so it is heuristic inference: browser identifiers appear as a name, slash and version, platform identifiers sit in the parenthesised description, and device information comes from the model string. Two errors follow — false positives from colliding fragments and misses on models no rule covers. It must not drive security decisions, since the client can fabricate the string.

InputPrepending "Edg/" to the string
OutputReports Edge while the client could be anything, which is why a user agent must not drive authorisation or risk scoring

Measured on This Page

Fixed: Blink versionThe old build showed Blink · 537.36 — the AppleWebKit token is a fixed compatibility value unchanged since 2013, not a Blink version; Blink tracks the browser major (Chrome 120 = Blink 120). Blink now shows no version
BrowsersChrome/120, Mobile Safari/17.2, Firefox/120, Edge/120 (the Edg token wins over Chrome) and Googlebot/2.1 all correct
OSWindows (NT 10.0 shown as Windows 10 — UA cannot distinguish Win11 since browsers froze the string), iOS 17.2, Linux, macOS 10.15.7, Android 14
DevicesiPhone to Apple iPhone (mobile), Pixel 8 to Google Pixel 8 (mobile), Mac to Apple Mac (desktop)
CPU namingx64 renders as amd64 (two names for the same architecture); Apple platforms show — because their UA never exposes the architecture
Edge casesEmpty and garbage input never throw; the five cards show —

This page uses a hand-written parser (about 230 lines of rules, replacing the AGPL-licensed ua-parser-js). Two cautions: a UA saying Windows NT 10.0 cannot distinguish Win10 from Win11 — mainstream browsers froze the UA string and Windows 11 still reports NT 10.0, which is intentional privacy tightening, not a parser bug; and CPU is always — for Apple platforms because Apple never exposes the architecture in the UA. Rule priority is deliberate: the Edg/ token beats Chrome (Edge's UA contains both), and the 'like Gecko' decoy never mistakes Chrome for Firefox.

How this was measured: Six sample user agents (Chrome/Windows, Safari/iPhone, Firefox/Linux, Edge/Mac, Chrome/Android, Googlebot) plus two edge cases (empty, garbage) were parsed and all five result cards compared field by field against hand-derived expectations, before and after the fix. · Measured 2026-10-30

How to Use

  1. Open "User-Agent Parser"
  2. Paste the UA string into the text box
  3. Browser, engine and OS are parsed instantly below
  4. Device model and CPU architecture appear too
  5. Click a sample UA to compare different clients

Use Cases

  • Log analysis — Extract browser and OS distribution from server access logs to understand your audience.
  • Compatibility triage — Paste a reporter's UA to confirm whether their browser version triggers a known bug.
  • Device routing — Determine if a UA is phone, tablet, or desktop to validate responsive or redirect logic.
  • Bot detection — Tell a real browser apart from a crawler or bot UA with telltale signatures.
  • Analytics check — Verify your own tracking classifies browser versions the same as a standard parser.
  • Support ticket triage — Parse a UA string from a bug report to immediately identify the browser and OS the user is on.
  • Feature flag targeting — Check how a UA string is classified to verify feature-flag or A/B test targeting rules.

FAQ

Can I trust the UA string?

No. A UA can be freely spoofed by users or scripts, so it must not drive security decisions — only statistics and compatibility hints.

Why do so many UAs contain Mozilla/5.0?

A historical artifact. To pass early browser sniffing, every browser kept the Mozilla prefix; today it is a meaningless compatibility token by convention.

Can it identify the exact phone model?

Some Android UAs include a model string that can be read; iOS devices report only iPhone/iPad for privacy, so the specific model cannot be distinguished.

Why does Chrome's UA mention Safari and AppleWebKit?

Chrome uses Blink, derived from WebKit, and keeps the AppleWebKit and Safari tokens for compatibility with legacy sniffing — this is normal.

Is the UA being phased down?

Yes. Major browsers are rolling out User-Agent Reduction and Client Hints, removing some details from the UA string over time, so analytics should adapt.

The result says Unknown or is clearly wrong?

User-Agent strings are untrustworthy: they can be faked and new releases may not yet be in the rules. Unknown usually means a rare crawler, embedded WebView or a modified UA. For real browser detection prefer feature detection over UA alone.

The same device parses differently each time?

First confirm the UA strings really match — extensions often append language or view info. If the UA is identical but results differ, you are probably hitting different rule-library versions on different endpoints rather than an unstable parser.

A mobile browser is detected as desktop?

On Android, Chrome omits the Mobile token for tablets and for "Request desktop site", so the result is desktop — the UA genuinely lacks the signal. For precise classification pair the parser with feature detection or Client Hints.