What Is a User Agent?
A user agent is the software acting on your behalf on the web — your browser — and the user agent string is how it introduces itself. Every time your browser requests a page, an image or a script, it adds a User-Agent header to the request. Scripts running on a page can read the same text from navigator.userAgent, which is what this page does.
Websites use it to choose between mobile and desktop layouts, offer the right download for your operating system, warn about outdated browsers, and count which browsers their visitors use. Servers also log it, which helps engineers trace bugs that only happen in one browser and spot automated traffic from bots and scrapers.
For a plain-language summary of the same information — browser, engine, operating system, cookies and JavaScript — see What Is My Browser.
How to Read a User Agent String
The format comes from the HTTP specification: a series of product tokens written as Name/version, separated by spaces, with optional comments in brackets. Comments usually hold the platform: operating system, device and processor. Here is a typical Chrome on Windows user agent, split up:
| Part | What it means |
|---|---|
| Mozilla/5.0 | Compatibility token sent by every modern browser |
| (Windows NT 10.0; Win64; x64) | Windows 10 or 11, 64-bit |
| AppleWebKit/537.36 | Engine token; fixed at 537.36 in all Chromium browsers |
| (KHTML, like Gecko) | Compatibility phrase inherited from KDE’s browser engine |
| Chrome/131.0.0.0 | The real browser: Chrome 131 (minor version hidden) |
| Safari/537.36 | Compatibility token for sites that check for Safari |
Other browsers add their own token at the end: Edge appends Edg/, Opera OPR/ and Samsung Internet SamsungBrowser/. Firefox looks different — Gecko/20100101 Firefox/133.0 — and Safari puts its version in a Version/ token. On iPhone, Chrome and Firefox identify themselves with CriOS/ and FxiOS/ on top of Safari’s WebKit tokens. The breakdown at the top of this page explains each token in your own string.
Why Every Browser Says Mozilla, Safari and Gecko
User agent strings look strange because each new browser copied the one before it to avoid being shut out. Netscape Navigator identified itself as “Mozilla”, and many websites in the 1990s only sent their best pages to Mozilla. Internet Explorer responded by sending Mozilla/4.0 (compatible; MSIE …). KDE’s Konqueror browser, whose KHTML engine later became Apple’s WebKit, added “like Gecko” so sites written for Netscape’s successor would work. Safari added its own Safari token, and when Chrome arrived in 2008 on WebKit, it kept everything Safari sent and appended Chrome.
Chrome later switched to its own engine, Blink, but it still sends AppleWebKit/537.36 and Safari/537.36: removing them would break sites that still check for those words. That is why a Chrome user agent names four browsers — Mozilla, Safari, Gecko and Chrome — and only one of them is true.
User Agent Reduction and Client Hints
Because the full user agent string is sent to every site automatically, it adds to the information that can fingerprint a browser. Browsers have been trimming it. Every major browser now reports macOS as 10.15 whatever version you run, and Chrome’s reduced user agent replaces the minor version with zeros, reports every Android version as Android 10, and replaces the phone model with the letter K.
Chromium-based browsers moved the detail into User-Agent Client Hints. By default each request carries only three low-detail hints — Sec-CH-UA (brand and major version), Sec-CH-UA-Mobile and Sec-CH-UA-Platform. A website that needs more has to ask, either with an Accept-CH response header or through navigator.userAgentData.getHighEntropyValues() in JavaScript. This page asks for the platform version, architecture, bitness, model and full version list and shows the result in the Client Hints line of the card. Firefox and Safari do not support Client Hints, so the line says so in those browsers.
How to Change Your User Agent
Developers change the user agent to test how a site behaves for other browsers and devices. You can do it without installing anything:
- Chrome and Edge: open Developer Tools (F12), choose ⋮ → More tools → Network conditions, untick “Use browser default” and pick or type a user agent. Device mode (Ctrl+Shift+M) also switches to mobile user agents.
- Safari: turn on “Show features for web developers” in Settings → Advanced, then choose Develop → User Agent.
- Firefox: type
about:configin the address bar and create a string preference namedgeneral.useragent.override. - Phones: “Request desktop site” or “Desktop site” in the browser menu sends a desktop user agent for the current site.
Reload this page afterwards to check the new string. Changing the user agent does not make you anonymous — your IP address, screen size and other signals stay the same — and some websites stop working when the user agent and the browser’s real features disagree.
What Your User Agent Reveals About You
Your user agent reveals your browser and version, your operating system and often its version, whether you are on a phone, tablet or computer, and sometimes the device model or that you are inside an app’s built-in browser. It does not reveal your name, location, IP address or anything you have typed.
On its own it is not identifying: millions of people run the same browser version on the same system. It becomes more telling in combination. Your public IP address (see What Is My IP), screen resolution and pixel ratio (see What Is My Screen Resolution), time zone, language and installed fonts together can make a browser stand out. Privacy-focused browsers such as the Tor Browser deliberately make these values identical for large groups of users so no one stands out.
How to Read the User Agent in Code
The same string is available in the browser and on the server:
// Browser (JavaScript)
navigator.userAgent
// Node.js with Express
req.get('User-Agent')
// PHP
$_SERVER['HTTP_USER_AGENT']
// Python with Flask
request.headers.get('User-Agent')Use it for logging and analytics, but avoid using it to decide which features to enable. Checking for the feature itself — for example 'share' in navigator or the CSS @supports rule — keeps working when browsers change their user agent, which they now do regularly. If you need browser details on the server in Chromium browsers, request the Client Hints you need with Accept-CH rather than parsing the reduced string.
Frequently Asked Questions
What is my user agent?
Your user agent is the line of text your browser uses to identify itself. It names the browser and its version, the rendering engine and the operating system. This page shows yours at the top, read from navigator.userAgent in your browser, with a button to copy it and an explanation of every part.
How do I read a user agent string?
A user agent is a list of product tokens in the form Name/version, with platform details in brackets. For example, in “Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36”, the brackets say 64-bit Windows 10 or 11, Chrome/131 is the real browser version, and Mozilla/5.0, AppleWebKit/537.36, KHTML, like Gecko and Safari/537.36 are compatibility tokens kept for old websites.
Why does every user agent start with Mozilla/5.0?
In the 1990s many websites only sent advanced pages to Netscape Navigator, whose user agent began with “Mozilla”. Internet Explorer started calling itself “Mozilla compatible” to get those pages, and every browser since has kept the token so it is never treated as an old browser. Today it carries no information.
What are User-Agent Client Hints?
Client Hints are the newer way for Chromium-based browsers such as Chrome and Edge to share browser details. By default they send only the browser brand and major version, whether the device is mobile, and the platform name. Websites must ask for more, such as the full version, operating system version or device model. Chrome now trims its user agent string and moves those details into Client Hints. Firefox and Safari do not support them.
How do I change my user agent?
In Chrome or Edge, open Developer Tools, choose More tools → Network conditions and untick “Use browser default” to pick or type another user agent. In Safari, turn on Show features for web developers in Settings → Advanced, then use Develop → User Agent. In Firefox, set general.useragent.override in about:config. On phones, “Request desktop site” switches to a desktop user agent. Changing it does not make you anonymous, and some sites may break.
Can websites identify me from my user agent?
Not by itself. Your browser sends the user agent with every request to every website, and it is shared by millions of people with the same browser version and operating system. Combined with other details such as screen size, language, time zone and installed fonts, it becomes part of a browser fingerprint that can help recognise a device. Browsers reduce their user agent strings partly for this reason.