User-Agent

The HTTP User-Agent request header identifies the client software, version, and platform sending the request.

Usage

Clients include User-Agent in every request to identify the application, operating system, and rendering engine to the server. Servers use this information for content negotiation, analytics, and compatibility adjustments.

The value follows a structured format of product tokens. Each token consists of a product name and an optional version, followed by optional comments in parentheses. Multiple tokens appear space-separated.

User-Agent: <product>/<version> (<comment>) <product>/<version>

In practice, browser User-Agent strings have grown long and complex due to historical compatibility patterns. Most browsers include Mozilla/5.0 as the first token for legacy reasons, followed by platform details in a comment, then engine and browser tokens.

Servers serving different content based on User-Agent values implement a form of content negotiation. Search engine crawlers identify themselves through this header, allowing servers to apply crawler-specific logic. Bot detection systems analyze User-Agent patterns to distinguish automated traffic from human visitors.

The Sec-CH-UA family of headers provides a structured alternative to the User-Agent string. User-Agent Client Hints deliver the same information in a parsed, low-entropy format. The browser sends a minimal set of hints by default, and the server requests additional detail through the Accept-CH response header. This reduces the passive fingerprinting surface compared to a full User-Agent string.

Directives

product

A product identifier for the client software. By convention, the most significant product is listed first.

version

A version string associated with the preceding product token, separated by a forward slash.

comment

Additional details in parentheses, typically describing the operating system, device, or platform. Comments appear after a product/version pair.

Example

A desktop browser sends a User-Agent string containing the platform, rendering engine, and browser version. The Mozilla/5.0 prefix is a historical artifact present in all modern browsers.

User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36

A mobile browser includes device and mobile platform information in the comment section.

User-Agent: Mozilla/5.0 (Linux; Android 14; Pixel 8) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Mobile Safari/537.36

Chrome's UA reduction freezes the minor, build, and patch components to 0.0.0. The major version increments with each release.

Search engine crawlers use distinctive User-Agent values for identification. The comment often contains a URL pointing to documentation about the crawler.

User-Agent: Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)

Bingbot uses an evergreen Chromium-based UA string. The W.X.Y.Z version component updates automatically to match the current Chrome release.

Desktop:

User-Agent: Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; bingbot/2.0; +http://www.bing.com/bingbot.htm) Chrome/W.X.Y.Z Safari/537.36

Mobile:

User-Agent: Mozilla/5.0 (Linux; Android 6.0.1; Nexus 5X Build/MMB29P) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/W.X.Y.Z Mobile Safari/537.36 (compatible; bingbot/2.0; +http://www.bing.com/bingbot.htm)

Command-line tools and HTTP libraries send shorter, simpler values.

User-Agent: curl/8.4.0

Takeaway

The User-Agent header identifies client software, version, and platform in each request. The Sec-CH-UA Client Hints headers offer a structured, lower-entropy alternative for communicating the same information with reduced fingerprinting exposure.

See also

Last updated: March 6, 2026