Developer Tools

Why User-Agent Strings Are So Complicated

Many browsers' User-Agent strings retain older browser tokens. Here's the compatibility chain that explains why Chrome still says "Mozilla," "Safari," and "like Gecko."

By Inventive HQ Team

The User-Agent string is complicated because many modern browsers retain compatibility tokens from earlier browsers — Chrome's string includes "Mozilla," "AppleWebKit," "KHTML, like Gecko," and "Safari" alongside its own name. This is the residue of decades of browser compatibility work: web servers used to sniff the User-Agent to decide which features to serve, so newer browsers often retained familiar tokens to avoid being served different content. The result is a string where a Chrome-labeled token (Chrome/120.0.0.0 in the example below) appears among compatibility tokens. That token alone does not establish the browser: Microsoft's Edge example includes the same Chrome/120.0.0.0 token followed by Edg/120.0.0.0. Like the rest of the header, these tokens are client-supplied and can be spoofed. MDN's User-Agent reference shows current browser and non-browser formats.

That is the summary an AI Overview would give you. Here is what it can't show you — the exact anatomy of a real string, the impersonation chain that produced each token, a lookup table of which claims are true, and a live parser you can paste your own User-Agent into.

Anatomy of a real User-Agent string

Here is an example Chrome 120-on-Windows User-Agent, dissected token by token. The highlighted segments include browser, platform, and compatibility tokens; the string alone cannot verify any of them. Other Chromium browsers may include the same Chrome-labeled token alongside their own tokens:

Anatomy of a Chrome User-Agent string A breakdown of Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36, labeling compatibility, platform, engine, and browser tokens. The x64 and Chrome tokens do not prove the CPU architecture or browser identity. One string, six claims Chrome and Edge can share these tokens; the header can be spoofed Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 Mozilla/5.0 Fossil from Netscape. Common in current browsers. Windows NT 10.0 Fixed Windows OS/CPU segment in reduced Chrome UA. AppleWebKit/537.36 Compatibility token; Chrome uses Blink. Chrome/120.0.0.0 Also appears in Edge UA. Minor version zeroed. (KHTML, like Gecko) — "I render like Firefox's Gecko engine" (it does not) Safari/537.36 — compatibility token retained by Chrome
Advertisement

The impersonation chain: how it got this bad

These tokens accumulated as browsers adapted to sites that checked User-Agent strings. The timeline below illustrates several steps in that history.

The User-Agent compatibility chain, 1993 to 2008 Timeline showing Mosaic, Netscape/Mozilla, Internet Explorer, Safari, and Chrome each adopting the identifying tokens of prior browsers. Compatibility tokens accumulated across browsers 1993 · NCSA Mosaic NCSA_Mosaic — an early browser product token 1994 · Netscape Navigator ("Mozilla") Mozilla/1.0 — Netscape's browser token 1995 · Internet Explorer 2.0 for Windows 95 Mozilla/… (compatible; MSIE 2.0; …) — IE uses a Mozilla token 2003 · Safari (built on KHTML/WebKit) …AppleWebKit/48 (like Gecko) Safari/48 — January 2003 Safari UA 2008 · Chrome retains Safari-style tokens Mozilla + AppleWebKit + KHTML/Gecko + Chrome + Safari tokens

Browser sniffing encouraged later browsers to retain familiar tokens for compatibility. Removing a token can still affect sites that check for it. NCSA documents Mosaic's early history, and Mozilla recounts Netscape's 1994 launch. The Computer History Museum dates IE 2.0's Windows 95 release to November 1995; Microsoft's March 1996 announcement concerns additional language releases. Mozilla's historical account explains IE's Mozilla compatibility token. Apple announced Safari in 2003, WebKit documents its AppleWebKit and like Gecko tokens, and Google dates Chrome's launch to 2008.

Token-by-token: which claims are actually true?

This fixed table explains the Chrome-on-Windows example above. The parser below analyzes a string you enter separately; it does not update this table.

TokenWhat it claimsIs it true?Why it's there
Mozilla/5.0"Mozilla-compatible"Compatibility tokenCommon in current browsers; some other clients use different prefixes
Windows NT 10.0"Running on Windows 10"PartlyWindows 11 also reports 10.0 — indistinguishable here
Win64; x64"64-bit Windows on x64"Not reliable for CPU architectureChrome fixes the Windows OS/CPU segment to Windows NT 10.0; Win64; x64, so x64 does not establish the actual CPU architecture, including on Windows on Arm; see Chrome's reduction guidance
AppleWebKit/537.36"WebKit engine build 537.36"NoCompatibility token in this Chrome example; Blink is its rendering engine
(KHTML, like Gecko)"I render like KHTML and Gecko"NoCompatibility wording for sites that checked KHTML or Gecko tokens
Chrome/120.0.0.0"Chrome 120"Does not identify Chrome by itselfChromium-based browsers can include this token; Microsoft's Edge 120 example also includes Edg/120.0.0.0. The minor/build components are zeroed in reduced UAs, and the header can be spoofed
Safari/537.36"I am also Safari"NoInherited so Safari-targeted content still loads

Parse your own User-Agent

The parser analyzes the string you enter in your browser. Paste a User-Agent string or click "Use My User-Agent" to insert your browser's string and inspect reported browser, engine, OS, and device details. The tool bundle loads over the network, and if loading ultimately fails, the site's error report sends your browser's navigator.userAgent to /api/bundles/manage.

Interactive toolUser Agent ParserRuns in your browser — nothing is uploaded.

Where this is heading: User-Agent Client Hints

One way to reduce reliance on the legacy string is User-Agent Client Hints (UA-CH), which provide structured headers in supporting browsers. Some hints are sent by default; sites can request others with Accept-CH:

  • Sec-CH-UA — a low-entropy brand list with intentional "GREASE" noise, e.g. "Chromium";v="120", "Google Chrome";v="120", "Not?A_Brand";v="24". The extra brand is intended to discourage rigid brand matching.
  • Sec-CH-UA-Mobile — a boolean, ?0 or ?1.
  • Sec-CH-UA-Platform — "Windows", "macOS", "Android", etc.
  • Additional hints a site can request: Sec-CH-UA-Platform-Version (which can help distinguish Windows 11 from Windows 10 in supporting browsers), Sec-CH-UA-Full-Version-List, Sec-CH-UA-Arch, Sec-CH-UA-Model.

Alongside this, Chrome's User-Agent Reduction program reduced details in its legacy string: the minor version became 0.0.0, and some platform and device details were fixed or trimmed. Browser support for UA-CH varies, so sites still encounter legacy User-Agent headers. UA-CH provides a more structured way to request information, but its values are client-provided and can be overridden; do not use them as proof for security decisions. See Chrome's UA-CH guidance, MDN's User-Agent reduction guide, and Microsoft's client-hint override documentation.

The User-Agent is client-supplied text and can be spoofed. Use it for progressive enhancement, analytics, and layout hints where an incorrect value has little impact. Neither it nor UA-CH should be relied on alone for access control, licensing, or fraud prevention.

Further reading

Frequently Asked Questions

Why does Chrome's User-Agent say "Mozilla" and "Safari" when it is neither?

Because of a 30-year chain of compatibility spoofing. In the 1990s some websites served different pages to Netscape, whose UA started with "Mozilla." Internet Explorer copied "Mozilla/…(compatible; MSIE…)" to get the same pages. Safari later added "AppleWebKit" and "like Gecko" to avoid being excluded by browser sniffing, and Chrome retained Safari-style tokens for compatibility. These inherited tokens do not, by themselves, establish the browser's identity.

What does "Mozilla/5.0" actually mean today?

Many current browsers — including Chrome, Firefox, Safari, Edge, and Opera — begin their User-Agent with "Mozilla/5.0." It is a compatibility token from Netscape Navigator (codenamed "Mozilla," short for "Mosaic killer") that servers once used to detect a capable browser. It is a poor way to distinguish among those browsers, though other clients can use different prefixes. See the MDN User-Agent examples.

Does Windows 11 show up differently from Windows 10 in the User-Agent?

No. In the classic User-Agent string, Windows 11 still reports "Windows NT 10.0," as Windows 10 does. In supporting browsers, the User-Agent Client Hint "Sec-CH-UA-Platform-Version" can distinguish them: Windows 11 reports platform version 13.0.0 or higher, while Windows 10 reports lower values. As client-provided data, this is not proof of the operating system. See Microsoft's guidance.

Why does Chrome report AppleWebKit/537.36?

Chromium retains the AppleWebKit/537.36 token for compatibility, although its rendering engine is Blink. Safari uses its own WebKit version token, which can differ from 537.36.

What are User-Agent Client Hints and how are they different?

User-Agent Client Hints (UA-CH) are a set of structured HTTP request headers — Sec-CH-UA, Sec-CH-UA-Mobile, Sec-CH-UA-Platform, and on-demand "high-entropy" hints like Sec-CH-UA-Platform-Version — designed to provide a structured alternative to the monolithic User-Agent string. Supporting browsers send a small default set; sites can request additional hints. This can reduce passive exposure of detailed information, but the values remain client-provided.

Is the User-Agent header defined by an RFC?

Yes. The User-Agent request header is specified in RFC 9110 (HTTP Semantics, June 2022), section 10.1.5, which replaced the earlier RFC 7231. The specification says the header should list product tokens in decreasing order of significance. User-Agent Client Hints are described separately in a WICG draft, not an RFC.

Can I trust the User-Agent string to identify a browser?

Not for security decisions. The User-Agent is client-supplied plain text and can be spoofed. Use it for progressive enhancement and analytics where an incorrect value has little impact, but do not rely on it for access control, licensing, or fraud prevention. Client Hints can also be overridden and are not proof of identity.

Why did Chrome freeze its minor version to "0.0.0"?

As part of User-Agent Reduction, Chrome replaced the detailed minor/build numbers (for example 120.0.6099.129) with "120.0.0.0." The full build number added fingerprinting entropy without helping legitimate feature detection, so Chromium zeroed it out while keeping only the major version.

user-agent-parser