What a user agent actually is
Every time your browser asks a server for something, it attaches a set of headers to the request. One of them is called User-Agent, and it is a single line of text that says which browser you are running, roughly which version, and which operating system you are on. Servers read it to decide what to send back, for example a mobile layout instead of a desktop one.
It is worth being clear about one thing. The user agent is self reported. Your browser can say whatever it wants, and so can any script or tool. Nothing verifies it. That is why it is useful for layout decisions and analytics, and close to useless as a security check.
Reading the string piece by piece
Take a typical Chrome on Windows string:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/151.0.0.0 Safari/537.36
- Mozilla/5.0 is dead weight. Every browser sends it, and it tells you nothing.
- Windows NT 10.0 is the OS. Windows 10 and Windows 11 both report 10.0, so they cannot be told apart from the string alone.
- Win64; x64 is the architecture.
- AppleWebKit/537.36 (KHTML, like Gecko) is more history. Chrome moved to the Blink engine years ago but kept the token so old sniffing code keeps working.
- Chrome/151.0.0.0 is the real browser and version. Notice the three zeros, Chrome deliberately hides the minor version now.
- Safari/537.36 is there for the same compatibility reason as AppleWebKit.
Once you know that, most of these strings decode in a few seconds. Android adds the word Linux and the device model, iPhones say "like Mac OS X" even though they are not macOS, and that quirk trips up a lot of naive parsers.
How to change your user agent
Per browser, without any extension:
- Chrome and Edge: open developer tools, press the three dot menu, More tools, Network conditions, untick "Use browser default" and pick or type one.
- Firefox: open about:config, create a string called general.useragent.override and put your value in it. Delete the entry to go back to normal.
- Safari: enable the Develop menu in settings, then Develop, User Agent.
From the command line and from code:
curl -A "Mozilla/5.0 ..." https://example.comwget --user-agent="Mozilla/5.0 ..." https://example.com- Python requests: pass
headers={"User-Agent": "Mozilla/5.0 ..."}to the call.
User agents, proxies and getting blocked
If you are scraping or automating anything, the user agent and the IP address are the first two things a site looks at. The default user agent that libraries send is a giveaway. A header that literally says python-requests/2.32.3 is an announcement, and plenty of sites drop those requests before any other check runs.
Swapping in a real browser string is a start, but on its own it does not help much. A thousand requests from a single IP all claiming to be the same Chrome build is still an obvious pattern. The two go together: rotate the IP through a proxy and send a user agent that matches a browser that actually exists.
Consistency matters more than novelty. If your user agent says iPhone but your screen size says 2560 by 1440 and your timezone is a desktop one, the mismatch is a stronger signal than a plain default user agent would have been. Pick a profile and keep every part of it in agreement.
Client hints are replacing all of this
Chromium browsers have been freezing the User-Agent header for a while. The version numbers in it are padded with zeros and the OS detail is being reduced, on purpose, because the header leaks more than it needs to. The real values moved to a set of separate headers with the Sec-CH-UA prefix.
The catch is that a site only receives the detailed ones if it asks. The server sends an Accept-CH header listing what it wants, and the browser includes those from the next request onward. That is exactly what this page does, which is why reloading it usually reveals a few extra rows in the client hints table above. Firefox and Safari have not implemented client hints, so there you get the old header and nothing else.
Common questions
Why does my user agent say Mozilla?
Old servers in the 1990s checked for the token Mozilla before serving frames and modern HTML. Every browser that came after copied the token so it would not be served the stripped down version, and nobody has been able to remove it since without breaking sites.
Does changing my user agent hide me?
No. It changes one value out of dozens. Your IP, TLS fingerprint, fonts, canvas rendering, screen size and timezone are all still there. Changing only the user agent can make you more identifiable, because the combination you end up with is rarer than the one you started with.
Is my user agent unique to me?
On its own, usually not. Millions of people run the same Chrome build on the same Windows version. Combined with everything else your browser exposes, it often is. That is the whole idea behind browser fingerprinting.
Where does the data on this page come from?
The top section is parsed from the header on your current request, server side. The JavaScript section is read in your browser and never leaves it beyond what the page displays. We store the user agent string itself so we can keep our public user agent list current. We do not store it against your IP address.