A customer reports that your checkout button does nothing, and the support ticket includes a line like Mozilla/5.0 (Linux; Android 14; SM-S918B) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Mobile Safari/537.36. Your server logs are full of similar strings, plus others from crawlers you've never heard of. That line is a user agent string, and learning to read it quickly turns a vague bug report into "Chrome 126 on an Android phone".
This guide explains what a user agent string is, why it is so confusingly worded, how to decode each part, and where it is and isn't reliable. It also shows how to check your own browser's details and parse any string in seconds.
What a user agent string is
Every time a browser, app or bot requests a web page, it sends an HTTP header called User-Agent that identifies the software making the request. Servers use it for analytics, for debugging, for serving different downloads (a Windows installer versus a Mac one), and to recognise crawlers such as Googlebot.
Why everything says "Mozilla"
The strange wording is historical. In the 1990s, some sites sent richer pages only to Netscape (whose code name was Mozilla). Other browsers started claiming "Mozilla compatible" to get those pages too. Later, when sites checked for Gecko or Safari, new browsers added those names as well. The result is that today's strings carry decades of compatibility tokens.
Reading one piece by piece
Take the example above:
| Part | Meaning |
|---|---|
Mozilla/5.0 |
Historical token present in almost every browser |
(Linux; Android 14; SM-S918B) |
Platform details: Android 14, device model code |
AppleWebKit/537.36 (KHTML, like Gecko) |
Rendering engine lineage (Blink reports this for compatibility) |
Chrome/126.0.0.0 |
Browser and version |
Mobile |
A phone-sized browser |
Safari/537.36 |
Another compatibility token |
A desktop Firefox string looks different, with Gecko/20100101 Firefox/128.0, and an iPhone Safari string includes iPhone; CPU iPhone OS 17_5 like Mac OS X and Version/17.5. Crawlers usually include a name and an information URL, such as compatible; Googlebot/2.1; +http://www.google.com/bot.html.
Reduced user agents and Client Hints
Chromium-based browsers now send a reduced user agent: minor version numbers are frozen as zeros and some platform details are simplified. Richer information, such as the exact platform version or device model, is available through User-Agent Client Hints, which sites must request explicitly. This protects privacy by limiting passive fingerprinting. The practical effect is that parsing the string alone may give you "Android 10" or "Windows 10" even when the real version is newer.
Check or decode a user agent
The User Agent Parser shows your own details and decodes any string you paste, all in the browser.
- Open the User Agent Parser. The User agent string box fills with your own browser's string.
- To decode someone else's, click Clear and paste their string, or use one of the Try samples: Chrome on Android, Safari on iPhone, Firefox on Windows or Googlebot. My browser puts your own string back.
- Read the Detected summary, then the detail cards: Browser (name, version, major, type), Engine, Operating system, Device (type, vendor, model) and CPU architecture.
- When checking your own browser, the parser can refine results with your browser's User-Agent Client Hints, and says so when it does.
- Look at This device for details that do not come from the string at all: screen size, browser window size, pixel ratio, language, all languages, time zone, whether it has a touch screen and CPU cores. These describe the device you are using now, not the pasted string.
- Use Copy JSON under JSON result to attach a structured summary to a bug report.
A useful support workflow is to ask the customer to open the page and copy the JSON result, which gives you browser, OS, screen size and language in one message.
Other ways to find and parse user agents
Browser developer tools
In any desktop browser, open the developer console and type navigator.userAgent. The Network panel shows the User-Agent header on each request, and the device emulation mode lets you send a different one for testing.
Server logs and analytics
Web server access logs record the user agent for every request, and analytics tools group them into browser and device reports. For reading raw logs, the same parsing libraries used by the tool exist for most server languages.
Command line
curl -A "your string" https://example.com sends a request with a chosen user agent, which is handy for testing how a server responds to a specific browser or bot.
Tips and pitfalls
Prefer feature detection
Checking the user agent to decide whether a feature works is fragile. Browsers change, strings are frozen or spoofed, and new browsers borrow old names. Test for the feature itself instead, for example with if ('share' in navigator) or CSS @supports.
User agents can be faked
Any client can send any string. Scrapers often pretend to be Chrome or Googlebot. To confirm a genuine Googlebot, search engines document a reverse DNS check; the user agent alone is not proof. Once you know who a crawler really is, you can manage it with a robots.txt file.
Don't treat "Mobile" as a screen size
Tablets, foldables and desktop-mode browsers blur the line. For layout, use responsive CSS and test widths with a responsive design tester rather than branching on the user agent.
Screen details
If you need the viewport or screen resolution for a bug report, the screen resolution checker focuses on exactly that.
Frequently asked questions
How do I find my user agent?
Open a user agent parser in your browser and it will show your string immediately, or type navigator.userAgent in the browser's developer console.
Can a website identify me from my user agent?
On its own, a user agent is shared by millions of people with the same browser and device. Combined with other signals it can contribute to fingerprinting, which is one reason browsers are reducing the detail it contains.
Why does my Windows 11 PC show as Windows 10?
Browsers kept the Windows platform token frozen for compatibility, so the string cannot distinguish Windows 11 from Windows 10. Client Hints can reveal the actual platform version when a site requests it.
Why does Chrome's user agent mention Safari?
It is a compatibility token left over from the days when sites checked for Safari or WebKit. It does not mean Safari is involved.
Can I change my browser's user agent?
Yes. Developer tools can override it for testing, and extensions can change it permanently. Sites may then serve pages meant for a different browser.