Examples
| Client | Browser / bot | OS | Device |
|---|---|---|---|
| Chrome on Windows | Chrome 141.0.0.0 | Windows 10 or 11 | Desktop |
| Safari on iPhone | Mobile Safari 18.6 | iOS 18.6 | Mobile |
| Chrome on Android | Chrome 141.0.0.0 | Android unknown (frozen) | Mobile |
| Firefox on macOS | Firefox 143.0 | Mac OS 10.15 or later (frozen) | Desktop |
| Googlebot | Googlebot (Search engine) | Android 6.0.1 | Bot |
| GPTBot | GPTBot (AI crawler) | — | Bot |
| curl | curl (HTTP client) | — | Bot |
Reading the User-Agent in code
navigator.userAgent;
// Chromium browsers: structured and more accurate
const ua = navigator.userAgentData;
ua?.mobile; // false
ua?.platform; // "Windows"
const { platformVersion, model } = await ua.getHighEntropyValues(['platformVersion', 'model']);
// Windows: platformVersion >= 13 means Windows 11
from flask import request
ua = request.headers.get("User-Agent", "")
platform = request.headers.get("Sec-CH-UA-Platform") # '"Windows"', when the browser sends it
curl -A 'Mozilla/5.0 (compatible; MyBot/1.0; +https://example.com/bot)' https://example.com
Inspecting other request headers? The HTTP header checker explains caching, CORS and security headers. Turning a browser request into code? Use the curl converter.
Frequently asked questions
What is a User-Agent string?
A line of text that browsers, apps and bots send with every HTTP request in the User-Agent header, describing the software making the request. Servers use it for analytics, to block or allow bots, and sometimes to serve different content. It’s easy to fake, so never rely on it for security.
Why does every browser say “Mozilla/5.0”?
History. In the 1990s, sites sent advanced pages only to Netscape (codenamed Mozilla), so other browsers started claiming to be Mozilla to get them. Every browser since has copied the parts of its competitors’ strings that sites checked for, which is why Chrome’s string also mentions AppleWebKit, KHTML, Gecko and Safari.
Why does my Windows 11 PC show as Windows 10?
Browsers froze parts of the User-Agent to reduce fingerprinting. Windows 11 still sends “Windows NT 10.0”, macOS is always reported as 10.15.7, Chrome on Android sends “Android 10; K” instead of the real version and model, and Chromium sends only its major version. The real values are available through User-Agent Client Hints, which this page reads from your browser if it supports them.
What are User-Agent Client Hints?
A replacement for the User-Agent string in Chromium browsers. By default the browser sends a few low-detail headers (Sec-CH-UA with the brand and major version, Sec-CH-UA-Mobile and Sec-CH-UA-Platform). A server that needs more asks for it with an Accept-CH response header, for example Accept-CH: Sec-CH-UA-Platform-Version, Sec-CH-UA-Model. In JavaScript, use navigator.userAgentData. Firefox and Safari don’t support them.
How can I tell if a request comes from a real Googlebot?
The User-Agent alone can be faked by any scraper. Do a reverse DNS lookup of the IP address (it must end in googlebot.com, google.com or googleusercontent.com), then a forward lookup of that name to confirm it resolves to the same IP. Google, Bing, OpenAI and Anthropic also publish the IP ranges of their crawlers.