What Is a User-Agent String? How to Read One (2026)
A user-agent string is the text a client puts in the User-Agent HTTP request header to say what software sent the request. Browsers, crawlers, mobile apps and CLI tools all send one. You see it in access logs, analytics, WAF events and navigator.userAgent. RFC 9110 §10.1.5 defines the header. Anyone can set it to anything, so treat it as a hint, never as proof.
Paste one into the User-Agent Parser to split browser, OS, device and bot labels. The strings below are labelled with where they came from; none were invented.
Read one token by token
Here is a current desktop Chrome string from MDN's User-Agent page (reduced form: minor build numbers are zeros):
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36
(KHTML, like Gecko) Chrome/143.0.0.0 Safari/537.36
Reading left to right:
| Token | What it is doing |
|---|---|
Mozilla/5.0 | Compatibility token. Almost every browser starts this way because old sites sniffed for Netscape. |
(Windows NT 10.0; Win64; x64) | Platform comment: OS and CPU. Under UA reduction this is coarser than it used to be. |
AppleWebKit/537.36 | Claims the WebKit engine version Chrome is compatible with. |
(KHTML, like Gecko) | Historical "looks like KHTML / Gecko" comment for the same reason. |
Chrome/143.0.0.0 | The actual browser product and major version. |
Safari/537.36 | Another compatibility product token. Chrome is not Safari; sites used to require the word "Safari". |
So Chrome says Mozilla and Safari because decades of broken sniffing trained every engine to wear the same costume. Firefox is cleaner. MDN's Firefox example:
Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:47.0) Gecko/20100101 Firefox/47.0
rv: is the Gecko release version, Gecko/20100101 is the frozen trail token, and Firefox/47.0 is the product. (That MDN example is an older version number; the shape is what matters.)
The on-site parser's client logic, run on the Chrome string on 16 October 2026, returns: browser Chrome 143.0.0.0, OS Windows 10/11, device Desktop, plus the note that UA strings are trivially spoofed.
Mobile, bots and tools
Mobile Chrome (also from MDN) adds Mobile and a reduced Android platform token:
Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36
(KHTML, like Gecko) Chrome/143.0.0.0 Mobile Safari/537.36
Crawlers advertise themselves in the product or comment. Google's common Googlebot form (from Google's crawler docs):
Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible;
Googlebot/2.1; +http://www.google.com/bot.html)
Chrome/W.X.Y.Z Safari/537.36
CLI defaults are short and honest. Captured on this box against a local echo server on 16 October 2026:
curl/8.14.1
python-requests/2.34.2
Those came from curl 8.14.1 and requests 2.34.2 with no -A / no custom header.
Why the header proves nothing
Setting the header is one flag. On the same box:
curl -A 'Googlebot/2.1 (+http://www.google.com/bot.html)' http://127.0.0.1:8765/
returned exactly that Googlebot string. The parser then labels it Googlebot. The label is correct about the text; it says nothing about who sent it. So do not allow-list, rate-limit-exempt or authenticate on User-Agent alone. Use it as one signal next to IP reputation, TLS fingerprinting you already trust, behaviour and (for crawlers) the DNS check below.
UA is a request header. Response security headers are a different topic: see HTTP security headers and the header analyzer.
Is this Googlebot real?
When a client claims to be Googlebot, Google's documented check is reverse-then-forward DNS (Verifying Googlebot):
- Reverse-DNS the source IP.
- The PTR hostname must end in
googlebot.com,google.comorgoogleusercontent.com. - Forward-DNS that hostname; the A/AAAA answer must be the same IP you started with.
Google's own example (commands and output from that page; not run on this box, because local dig is sandboxed):
host 66.249.66.1
1.66.249.66.in-addr.arpa domain name pointer crawl-66-249-66-1.googlebot.com.
host crawl-66-249-66-1.googlebot.com
crawl-66-249-66-1.googlebot.com has address 66.249.66.1
You can also match the IP against Google's published crawler ranges. For the PTR half, see Reverse DNS and PTR records and the reverse DNS lookup tool. For the forward A/AAAA half, see DNS record types.
UA reduction and client hints
Browsers cut the UA down because the old string was a fingerprinting surface. MDN: User-Agent reduction describes what drops: exact OS version, device model and fine-grained Chrome build numbers (hence Chrome/143.0.0.0 above). Chromium's UA reduction reference documents the reduced desktop shape.
Servers that still need detail can opt in with User-Agent Client Hints. After Accept-CH, the client may send structured headers such as (MDN Android example):
Sec-CH-UA: "Google Chrome";v="143", "Chromium";v="143", "Not A(Brand";v="24"
Sec-CH-UA-Platform: "Android"
Sec-CH-UA-Mobile: ?1
Low-entropy hints go by default; high-entropy ones like model need an explicit request (Sec-CH-UA-Model, Sec-CH-UA-Form-Factors). Hints are still spoofable by a custom client; they mainly reduce passive fingerprinting for normal browsers.
Reading UAs in your own logs
Obvious automation strings are a signal, not a verdict. Correlate with source IP, request rate and paths. On a sample access log built for this article (synthetic IPs in 203.0.113.0/24):
awk -F\" '{print $4}' sample-access.log | sort | uniq -c | sort -nr
1 python-requests/2.34.2
1 curl/8.14.1
1 Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; Googlebot/2.1; +http://www.google.com/bot.html) Chrome/143.0.0.0 Safari/537.36
1 Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/143.0.0.0 Safari/537.36
A burst of python-requests hitting /wp-login.php is more interesting than a single Googlebot fetch of /robots.txt. Prove Googlebot with the DNS steps above before you trust the label.
Privacy
The full historical UA identified OS patch level, device model and minor browser builds. That is why reduction happened: less free fingerprinting material on every request. Prefer client hints when you truly need the extra bits, and collect only what you use.
FAQ
Why does every browser say Mozilla?
Legacy sniffing. Sites once branched on "Mozilla", so every engine kept the token.
Can a website see my user agent?
Yes. It arrives with every HTTP request, and scripts can read navigator.userAgent.
Can I change my user agent?
Yes (devtools, extensions, curl -A). That is exactly why servers must not trust it alone.
How do I check if a bot is really Googlebot?
Reverse DNS, check the hostname suffix, forward DNS back to the same IP — or match Google's published IP ranges. The UA string alone is not enough.
What are user-agent client hints?
Sec-CH-UA-* request headers that send browser brand, platform and related data in a structured form, with high-entropy fields only after the server asks.