How to Read a User Agent String (With Examples)

How to Read a User Agent String (With Examples)

Every time a browser loads a page, it introduces itself with a line of text called a user agent string. It names the browser, its version, the operating system and the device — and it is the reason a site can serve you a mobile layout on your phone and a desktop layout on your laptop. The problem is that the string looks like alphabet soup. This guide teaches you to read one, decodes two real examples, and explains why you should never fully trust what it says.

If you just want the answer, paste the string into our free User Agent Parser. It shows the browser and version, the operating system, the device type and the rendering engine in plain English. Press “Use my browser’s string” and it parses your own browser automatically. Nothing is uploaded — the parsing happens entirely in your browser.

What a user agent string looks like

A typical desktop Chrome string is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36. The “Mozilla/5.0” at the start is a historical fossil — every browser claims it for compatibility with very old websites. The part in brackets describes the system: Windows NT 10.0 is Windows 10 or 11, Win64 means 64-bit Windows, x64 is the processor. Then come the engine tokens — AppleWebKit/537.36 and KHTML, like Gecko — and finally the real identity: Chrome/120.0.0.0, with Safari/537.36 tacked on the end for the same compatibility reasons.

The trick to reading one is to look for the last browser token before the end. Chrome, Edge, Firefox and Opera all include “Chrome” or “Safari” tokens they do not mean literally, so the token that actually names the browser is usually the last specific one: Edg/ for Edge, OPR/ for Opera, Firefox/ for Firefox, and Version/ followed by Safari for real Safari. That is exactly what the parser checks, in that order.

Worked example 1: Chrome on Windows

Take “Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36”. The parser reports Google Chrome 120, Windows 10 / 11, Desktop, and the Blink engine. The version matters: Chrome 120 dates the browser to late 2023, so if you see it in 2026 you know the visitor has not updated in years. The “Win64; x64” tells you it is a 64-bit install, which is what almost every desktop now runs.

Worked example 2: Safari on iPhone

Now take “Mozilla/5.0 (iPhone; CPU iPhone OS 17_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.2 Mobile/15E148 Safari/604.1”. The “iPhone; CPU iPhone OS 17_2” gives the device and the iOS version in one breath. “Version/17.2” is the Safari version, “Mobile/15E148” is the build, and the parser reports Safari 17.2, iOS (iPhone), Mobile, and the WebKit engine. Note that every browser on an iPhone uses WebKit under the hood — Apple requires it — so even “Chrome” on iOS is really WebKit wearing a Chrome badge, and its user agent string will say so if you look closely.

Why user agents can be faked

Anyone can send any user agent string they like. A script can claim to be Chrome on Windows while running on a server in a data centre, and a bot can pretend to be Googlebot. That is why the parser’s result means “this is what the string claims”, not “this is proven”. Browsers are also making strings less informative on purpose: Chrome has been freezing parts of its user agent for privacy, moving detail into a newer system called Client Hints that sites must request explicitly. So a parser can tell you less about a visitor than it could five years ago — and that is by design.

Still, user agents are useful in the right places. Developers use them to reproduce a bug (“it only breaks on Safari 17”), to count how many visitors use each browser, and to spot bots in server logs — a “bot / crawler” result from the parser is often the first clue that a visit was not human. What they are not useful for is security decisions: never grant or deny access based on a user agent, because the visitor controls it completely.

Frequently asked questions

What is a user agent string?

A short line of text a browser sends with every web request, naming the browser, its version, the operating system and the device. Servers use it to serve the right layout — for example, a mobile page instead of a desktop one.

Can I change my own user agent?

Yes. Browsers have developer tools that let you send a different string, and extensions do the same. It is sometimes used to test how a site looks on another device, and sometimes to get past a site that blocks a particular browser.

Is my user agent private information?

Partly. It identifies your browser and OS, which combined with other signals can help fingerprint a device. That is one reason browsers are freezing user agent strings — the less they say, the harder fingerprinting becomes.

Try it yourself: paste any string into the User Agent Parser, and if you are debugging a web page, the Website Screenshot tool shows you how that page looks at desktop and mobile widths, while the URL Extractor pulls every link out of pasted text.