How to Read a User Agent String
A user agent string is a list of product tokens that accumulated for compatibility rather than clarity. Every browser begins with Mozilla/5.0 because of 1990s server sniffing, and most claim several rendering engines they do not use. Read it right to left: the last tokens usually identify the real browser, and everything before them is inherited noise.
User-Agent Parser
Decode a user-agent string into browser, engine and platform.
The format is a historical accident. Servers once checked for "Mozilla" before serving frames, so every competing browser added it, and each later browser added the names of its predecessors to avoid being excluded in turn. Nothing has ever been safely removable since.
That history is why the string is unreliable as a source of truth. It is trivially spoofed, frequently reduced for privacy, and increasingly frozen by browsers that report a fixed version regardless of the real one.
Step by step
-
Ignore the leading Mozilla/5.0
It appears in effectively every browser and carries no information. Chrome, Firefox, Safari and Edge all begin this way, as do most bots that want to look like a browser.
-
Read the platform in the first bracket
The parenthesised section holds the operating system: Windows NT 10.0 for Windows 10 and 11, Macintosh with a version, or Linux, Android or iPhone. Win64 and x64 indicate architecture rather than browser.
-
Find the real browser at the end
The last distinctive token usually wins. A string containing Chrome and then Edg is Edge; one containing Chrome and then OPR is Opera. Safari appears in nearly every Chromium string and rarely means Safari.
-
Treat the version numbers with suspicion
Safari/537.36 has been frozen for over a decade and identifies nothing. Chrome and Firefox now round or freeze the minor version deliberately, so precise version detection from the string is no longer possible.
-
Use it for logging, not for decisions
It is useful for aggregate traffic analysis and for reproducing a reported bug. It is the wrong basis for enabling a feature — test for the capability instead, which works regardless of what the browser claims to be.
Example
A single Edge on Windows string. Four browser names appear; only the last one is true.
User agent
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/125.0.0.0 Safari/537.36 Edg/125.0.0.0
What it means
Mozilla/5.0 historical, meaningless
Windows NT 10.0 Windows 10 or 11
AppleWebKit Chromium engine lineage
Chrome/125 Chromium version
Safari/537.36 frozen, not Safari
Edg/125 the actual browser
Frequently asked questions
Why does every browser say Mozilla?
Why does Chrome claim to be Safari?
Can a user agent string be trusted?
How do I tell Edge from Chrome?
What replaces user agent sniffing?
Tools used in this guide
All tools →- User-Agent Parser Decode a user-agent string into browser, engine and platform. In your browser
- Browser Information See what your browser reveals about your device. In your browser
- HTTP Header Parser Turn a raw header block into a readable table. In your browser
- Screen Resolution Checker Check your screen size, viewport and pixel ratio. In your browser
Related guides
All guides →Last reviewed .