User Agent Parser
Browser, engine, OS and device
The user agent string is the strangest header on the web, and its shape is entirely historical. Nearly every browser still begins with "Mozilla/5.0" because servers once sniffed for Netscape before serving modern markup, so everyone claimed to be it. Chrome names Safari, Safari names Gecko, and Edge names all of them, each layer added to avoid being locked out by someone’s detection code.
The result is a string that has to be parsed by heuristics rather than read. Order matters: Edge and Opera both contain "Chrome", so testing for Chrome first misidentifies them. This parser applies those rules in the right order and shows what it concluded, which is as much a demonstration of how fragile the exercise is as it is a lookup.
How to use it
- Paste a user agent stringFrom a log file, an analytics export, or a bug report where the reporter did not say which browser they were using.
- Or read your ownUse the current browser’s string to see what you are advertising to every site you visit.
- Read the breakdownBrowser, version, rendering engine, operating system and device type are inferred separately, so a wrong guess in one is visible rather than hidden.
Frequently asked questions
Why does every browser claim to be Mozilla?
A compatibility cascade from the 1990s. Servers checked for "Mozilla" before sending frames-capable markup, so Internet Explorer claimed it too; every later browser copied the trick to avoid being served a degraded page. The token now carries no information at all — every mainstream browser starts with Mozilla/5.0.
Should I use the user agent to detect features?
No. Detect the feature itself — check whether the API you need exists — because that stays correct as browsers change and it works for engines you have never heard of. User agent sniffing is how sites end up broken for a new browser version that behaves perfectly well.
Why do iPads report themselves as macOS?
Since iPadOS 13, Safari on iPad requests desktop sites by default and its user agent says Macintosh. So device detection by user agent misclassifies iPads as desktops, and the only reliable distinguishing signal is touch support combined with screen dimensions.
What are Client Hints?
The intended replacement. Instead of one string carrying everything, the browser sends a small set of headers and the server explicitly requests more detail if it needs it. Chrome has been freezing and reducing the traditional string in favour of them, so parsers will get less precise over time by design.
Can a user agent string be trusted?
Not at all. It is a header the client sets, and any client can send anything — browsers offer this in developer tools, and bots routinely impersonate real browsers. Use it for analytics and diagnostics, never for access control or security decisions.