A user agent string is text in the User-Agent header of an HTTP request. Every browser, app, crawler or script sends it automatically. A web server, CDN, analytics tool or developer reads it to identify the application type, engine, operating system and platform. The user-agent string is defined in the HTTP standard. It supports content negotiation, testing and reporting. The value can differ by browser version, device and operating system. In DevTools, open Network request headers to see it. It often begins with Mozilla/5.0. The UA string is self-reported, so it describes a claim, not proof.
The user agent string format is a sequence of product/version tokens, plus comments in parentheses. Tokens are separated by spaces. Parentheses carry optional platform notes. A typical user agent string names the browser, version, rendering engine, OS, and device details. This Chrome-on-Windows example shows the pattern:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/1xx.0.0.0 Safari/537.36
Some browser extensions can also add tokens when they need specific rendering. The practical rule is simple. Find the most specific product token. In this user agent string, only Chrome identifies the browser.
A user agent string tells you the claimed browser name and version, rendering engine, operating system, CPU architecture, and device type. Safari on iPhone includes iPhone, CPU iPhone OS, Mobile, and Safari. A server can infer a phone and WebKit rendering. Chrome on Android contains Linux, Android 10, K, then Chrome and Mobile. The K token can hide the exact handset. Mobile tokens matter. CriOS marks Chrome on iOS, FxiOS marks Firefox on iOS, and SamsungBrowser marks Samsung Internet. A crawler such as Googlebot normally states its own name instead of mimicking a desktop browser. Web servers use these clues for access analysis, ranking common software. For example, if analytics shows Mobile plus Android 10, K, the site may serve a small-screen layout. It still cannot recover the real device model or verify the claimed software. However, the user agent string alone does not prove identity, precise location, or whether the claim is true.
To read a user agent string, search for the most specific product token first. Many values include Chrome and Safari for compatibility, so browser identification depends on priority. A UA string can contain both generic and derivative markers. If a line contains both Chrome and Edg, Edg wins. The same rule applies to mobile builds, embedded web views, and scripts. For legacy Internet Explorer, Trident/ reveals the real engine even when compatibility mode changes MSIE. This is rarely needed now. Hand-written regex breaks quickly as new tokens appear. Use a maintained UA parser library or device-detection service instead.
Browser | Token to look for | Note |
|---|---|---|
Edge | Edg/, EdgA/, EdgiOS/ | Desktop and mobile variants override Chrome. |
Opera | OPR/, OPT/ | Desktop, Android, iPhone. |
Samsung Internet | SamsungBrowser/ | Android browser. |
Chrome on iOS | CriOS/ | Chrome on iPhone. |
Firefox | FxiOS/, Firefox/ | iOS token comes first. |
Chrome | Chrome/ | Check after specific tokens. |
Safari | Safari/ with Version/ | Only without Chrome tokens. |
The mess in a user agent string comes from browser sniffing. Early sites gave better pages only to strings containing Mozilla, so later browsers added Mozilla/5.0. Chrome adds AppleWebKit, KHTML, like Gecko, and Safari because sites once withheld Safari-compatible content from browsers that omitted them. A user-agent string therefore reads like a chain of compatibility claims, not a clean ID. Because the header is self-declared, any client can send misleading or false values.
The user agent string is losing detail because UA reduction limits fingerprinting. Chrome now reports a zeroed minor version, such as Chrome/90.0.0.0, and its Android traffic fixes the platform at Android 10. Windows 11 devices still send Windows NT 10.0, and many macOS clients report 10_15_7. Analytics therefore cannot reliably separate recent operating systems. The core trade-off is privacy over precision. User-Agent Client Hints replace passive parsing with Sec-CH-UA headers, but the server must ask and the browser decides what to share. Compatibility remains, but detailed detection becomes opt-in.
You can change the user agent string because it is just an HTTP header. DevTools device emulation, browser flags, anti-detect browsers, scripts, and HTTP libraries can send a fake user agent for layout checks, QA, or bot tests. But the header is only one signal. Sites check it against the IP address, network type, language, TLS, browser fingerprint, plus a datacenter IP contradicting a mobile claim. The FP-Block study (2015) found UA spoofing may create inconsistencies.
A proxy does not change this header by itself. OnlineProxy’s mobile proxies use real 4G/5G carrier IPs through modems and SIM routers with real SIM cards. That aligns the network side for a mobile request. For mobile tests, pair it with mobile proxies on real carrier IPs.
How do I find my user agent string? Press F12, open DevTools, click Network, reload, select a request, and check request headers. You can also run navigator.userAgent in the console.
Does “Mozilla/5.0” mean I use Firefox? No. It is a legacy compatibility prefix sent by virtually all browsers.
Is the user agent string enough to identify a person? No. It describes software and platform, is shared by many users, and can be changed. It may still add to passive browser fingerprinting, but it does not prove identity.