This page is not translated into all languages.
Sign in

User Agent String Explained: What It Is and What It Tells You

  • Seo Za
  • 5 minutes

What Is a User Agent String?

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.

User Agent String Format: Anatomy of a Real Example

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
  • Mozilla/5.0: legacy compatibility product token. It signals compatibility assumptions associated with Mozilla. It does not identify Firefox.
  • Windows NT 10.0; Win64; x64: platform comment. It reports a Windows NT 10.0 platform, a 64-bit Windows environment, and a 64-bit CPU.
  • AppleWebKit/537.36: engine product token. It identifies the WebKit-derived rendering engine and its compatibility version.
  • KHTML, like Gecko: historical compatibility comment. It signals rendering behavior similar to Gecko, without making the browser Gecko.
  • Chrome/1xx.0.0.0: identifying product token. It gives the real name and major version.
  • Safari/537.36: compatibility token. It does not mean the browser is Safari. It exists because many sites expect that compatibility pattern.

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.

What Does a User Agent String Tell You?

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.

How to Read a User Agent String and Identify the Browser

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.

Common identification tokens
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.

Why User Agent Strings Look So Messy

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.

Why the User Agent String Is Becoming Less Reliable: UA Reduction and Client Hints

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.

Can You Change or Fake a User Agent String?

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.

FAQ

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.