How to read a user agent string and what it says about your browser

How to read a user agent string and what it says about your browser

A user agent is the line of text your browser sends with every request. It names the browser and the system, but in a form built for very old websites. Read it token by token, then add the facts it leaves out.

Why a user agent is hard to read

Almost every browser's user agent starts with Mozilla/5.0, and Chrome's also says Safari. Old websites sent full pages only to browsers they recognised, so each new browser copied the names of the ones before it. The first words of the string tell you almost nothing as a result.

Modern browsers also freeze parts of it. Chromium browsers report a version like 124.0.0.0, every Android phone as "Android 10; K", and both Windows 10 and 11 as "Windows NT 10.0". Safari and Firefox freeze macOS at 10.15.7. A support team that reads the string at face value can blame the wrong system. And any program can send any user agent, so a bot can look exactly like Chrome.

Read the string, then the headers and the screen

Open What Is My User Agent. It shows the string your browser sends and splits it into browser, rendering engine, operating system, and device type. The parser checks tokens in a fixed order because the names overlap: Edge (Edg/) before Chrome, and Chrome before Safari. On iPhone and iPad the engine is always WebKit, even in Chrome (CriOS) and Firefox (FxiOS). In Chromium browsers it also reads the client hints, which give the exact version, the platform version (Windows 11 reports 13 or higher), and the device model. You can paste a string from a log file to parse it too.

The user agent is one request header among many. To see what a server sends back, use HTTP Headers. It fetches one URL from our server and lists the response headers, the status, and the final address after redirects. It shows response headers only, not the ones your browser sent, and a CDN that answers by country may give you different headers.

Layout bugs need one more fact the user agent never contains: the size of the screen. The Screen Resolution Checker shows the screen size and the browser viewport in CSS pixels, the device pixel ratio, and the physical pixels, and it updates when you resize the window. Copy all puts every value in one block for a bug report.

Read your user agent and collect the details for a bug report

  1. Open What Is My User Agent and copy the string at the top.
  2. Read the parsed browser, engine, operating system, and device type, and look in the client hints table for the exact version.
  3. To read a string by hand, look for Edg/ first, then Chrome, then Safari. The first one you find names the browser.
  4. Open the Screen Resolution Checker, reset the browser zoom to 100%, and press Copy all.
  5. If the bug involves a server response, check the URL in HTTP Headers and note the status and the headers.
  6. Paste the user agent, the screen values, and the headers into the bug report.

Where these readings fall short

  • Chromium browsers reduce their user agent, so the version, the Android model, and the Windows release are placeholders. The client hints are more accurate.
  • Any program can send any user agent. The result describes what was sent, not what is really there.
  • Browser zoom and display scaling change the reported screen size and pixel ratio.
  • HTTP Headers sends one GET from our server and shows response headers only.

Frequently asked questions

Why does every user agent start with Mozilla/5.0?

For compatibility. Old sites served full pages only to browsers they knew, so newer browsers copied the older names, and the token stayed.

Why does my Windows 11 PC show Windows NT 10.0?

Browsers send Windows NT 10.0 for both Windows 10 and 11. Chromium browsers report Windows 11 through client hints, with a platform version of 13 or higher.

Can I trust the user agent in my server logs?

Only as a hint. Any program can send any string, and bots often copy a real browser's user agent.

What should I put in a browser bug report?

The user agent, the exact browser version from the client hints, the viewport size, and the device pixel ratio.

Tools used in this guide

More from the blog

All guides