
User Agent Strings Explained: What Websites Know About Your Browser
Every time you visit a website, your browser introduces itself. It sends a small piece of text called a "user agent string" that tells the server what browser you are using, what version it is, what operating system you are running, and sometimes even what device you are on. This information shapes the content you receive, but it also reveals more about you than you might realize.
In this guide, we will break down what user agent strings contain, why they exist, how websites use them, and what you can do to manage the information you share. You can see exactly what your browser is sending right now using our User Agent tool.
What Is a User Agent String?
A user agent string is a text header sent by your browser (or any HTTP client) with every web request. It is included in the User-Agent HTTP header and is designed to identify the client software to the server.
Here is what a typical user agent string looks like:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36If that looks confusing and unnecessarily complex, you are not wrong. User agent strings carry decades of compatibility baggage, and understanding their format requires a brief history lesson.
The History of User Agent Strings
The Original Format
The first web browser, NCSA Mosaic, introduced user agent strings in the early 1990s with a simple format:
Mosaic/0.9Clean and straightforward: product name and version number.
The Mozilla Compatibility War
When Netscape Navigator arrived, it used the codename "Mozilla" (short for "Mosaic Killer") and added more detail:
Mozilla/1.0 (Win3.1)Netscape supported features that Mosaic did not, so web servers began checking the user agent string and serving richer content to "Mozilla" browsers. When Internet Explorer arrived, Microsoft wanted servers to send it the same content as Netscape. So IE declared itself as "Mozilla compatible":
Mozilla/2.0 (compatible; MSIE 3.0; Windows 95)This established a pattern that would repeat with every major browser: new browsers pretended to be older browsers to receive the right content.
The Modern Mess
When WebKit-based browsers (Safari, Chrome) arrived, they had to claim compatibility with everything that came before:
Safari:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.0 Safari/605.1.15Chrome (based on WebKit/Blink):
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36Edge (based on Chromium):
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36 Edg/120.0.0.0Notice how Chrome claims to be both WebKit and Safari, and Edge claims to be Chrome, WebKit, and Safari. Each browser appends its true identity at the end while maintaining the compatibility tokens that servers expect.
This is why "KHTML, like Gecko" appears in WebKit user agents: WebKit was originally forked from KHTML (the KDE HTML engine), and it needed to claim Gecko compatibility (Firefox's engine) to receive content correctly. The user agent string became a layered history of browser engine evolution.
Anatomy of a Modern User Agent String
Let us dissect a current Chrome user agent:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36| Component | Meaning |
|---|---|
| Mozilla/5.0 | Compatibility token (meaningless today, all browsers send this) |
| (Windows NT 10.0; Win64; x64) | Operating system: Windows 10/11, 64-bit |
| AppleWebKit/537.36 | Rendering engine: Blink (Chromium's fork of WebKit) |
| (KHTML, like Gecko) | Compatibility token for KHTML and Gecko-based content |
| Chrome/120.0.0.0 | Actual browser and version |
| Safari/537.36 | WebKit compatibility token |
Mobile User Agents
Mobile user agents include additional device information:
iPhone:
Mozilla/5.0 (iPhone; CPU iPhone OS 17_0 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.0 Mobile/15E148 Safari/604.1Android:
Mozilla/5.0 (Linux; Android 14; Pixel 8) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Mobile Safari/537.36Mobile user agents often include the device model (Pixel 8, iPhone), which can be used for device-specific optimizations or tracking.
You can inspect your exact user agent and see how it is parsed using our User Agent tool.
How Websites Use User Agent Strings
Content Adaptation
Websites use user agent strings to serve appropriate content:
- Responsive design decisions: Serving mobile-optimized pages to mobile browsers
- Feature detection fallback: Using user agent as a fallback when JavaScript feature detection is not possible
- Download pages: Offering the correct installer for your operating system (Windows .exe vs. macOS .dmg vs. Linux .deb)
- Video format selection: Choosing between different video codecs based on browser support
Analytics and Statistics
Web analytics platforms (Google Analytics, Matomo, etc.) parse user agent strings to generate reports about:
- Browser market share
- Operating system distribution
- Desktop vs. mobile traffic ratios
- Device manufacturer and model breakdown
Bot Detection
Websites use user agent strings as one signal for identifying automated traffic:
- Known bot signatures: Googlebot, Bingbot, and other crawlers identify themselves in their user agent strings
- Missing or unusual user agents: Requests without a user agent or with uncommon ones may be flagged as suspicious
- Consistency checks: If a user agent claims to be Chrome on Windows but the TCP fingerprint suggests Linux, this mismatch can indicate a bot or scraper
Ad Targeting
Advertisers use device and browser information from user agents for targeting:
- Premium device targeting (showing luxury ads to users on the latest iPhone)
- Platform-specific app install campaigns
- Browser-specific feature advertisements
User Agents and Privacy
Browser Fingerprinting
Your user agent string is one of many data points that websites can use to create a unique "fingerprint" of your browser. Combined with other signals like screen resolution, installed fonts, WebGL renderer, timezone, and language settings, your browser can be uniquely identified even without cookies.
The user agent alone provides several bits of identifying entropy:
- Browser name and exact version
- Operating system and version
- CPU architecture (x86, ARM)
- Device model (for mobile)
- Whether you are on mobile or desktop
The User Agent Reduction Initiative
Recognizing the privacy implications, Google launched the User-Agent Reduction initiative in Chrome. This project progressively reduces the specificity of information in the user agent string:
Before reduction:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.6099.109 Safari/537.36After reduction:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36The reduced version freezes the minor version numbers and removes granular platform details, making it harder to distinguish individual users while still providing enough information for basic content adaptation.
Client Hints: The Modern Alternative
Client Hints (RFC 8942) are a newer mechanism that replaces the monolithic user agent string with structured, on-demand headers. Instead of sending all information with every request, the server explicitly asks for what it needs:
Server response header:
Accept-CH: Sec-CH-UA-Platform, Sec-CH-UA-Mobile, Sec-CH-UAClient request headers (subsequent requests):
Sec-CH-UA: "Chromium";v="120", "Not A Brand";v="99"
Sec-CH-UA-Mobile: ?0
Sec-CH-UA-Platform: "Windows"Client Hints give servers the information they need while reducing the passive fingerprinting surface. The server must actively request specific hints, and the browser can control which hints it provides.
How to View and Manage Your User Agent
Viewing Your User Agent
The simplest way is to visit our User Agent tool, which displays your full user agent string and parses it into readable components. You can also check the full set of HTTP headers your browser sends using our HTTP Headers tool.
Alternatively, in your browser's developer console (F12), type:
navigator.userAgentChanging Your User Agent
Browser DevTools: In Chrome or Firefox DevTools, open the Network Conditions panel and select or type a custom user agent.
Browser extensions: Extensions like "User-Agent Switcher" let you change your user agent string with one click.
Programmatic use:
import requests
headers = {
'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36'
}
response = requests.get('https://example.com', headers=headers)Using a VPN
While a VPN does not change your user agent, it hides your IP address, removing another significant tracking vector. Combining a VPN with user agent management provides stronger privacy. Check your current IP visibility on our My IP page.
Common User Agent Strings Reference
Here are the user agent strings for major current browsers:
| Browser | User Agent |
|---|---|
| Chrome (Windows) | Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36 |
| Firefox (Windows) | Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:121.0) Gecko/20100101 Firefox/121.0 |
| Safari (macOS) | Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.2.1 Safari/605.1.15 |
| Edge (Windows) | Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36 Edg/120.0.0.0 |
| Googlebot | Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html) |
| Bingbot | Mozilla/5.0 (compatible; bingbot/2.0; +http://www.bing.com/bingbot.htm) |
Bot User Agents
Search engine bots identify themselves through their user agent:
Googlebot/2.1 (+http://www.google.com/bot.html)
Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)
Bingbot/2.0
Mozilla/5.0 (compatible; YandexBot/3.0; +http://yandex.com/bots)If you are a website owner, you can verify that a bot is legitimate by performing a reverse DNS lookup on its IP address using our Reverse DNS tool. Legitimate Googlebot IPs should resolve to hostnames ending in ".googlebot.com" or ".google.com."
Key Takeaways
- A user agent string identifies your browser, OS, and device to every website you visit
- The format is unnecessarily complex due to decades of browser compatibility wars
- Websites use user agents for content adaptation, analytics, bot detection, and ad targeting
- User agents contribute to browser fingerprinting, a privacy-eroding tracking technique
- Chrome's User-Agent Reduction initiative and Client Hints are modernizing how this information is shared
- Check your current user agent and how it is parsed with our User Agent tool
- View all headers your browser sends using our HTTP Headers tool
Related Articles:
WhatIsMyLocation Team
Our team of network engineers and web developers builds and maintains 25+ free networking and location tools used by thousands of users every month. Every article is reviewed for technical accuracy using real-world testing with our own tools.
Related Articles
Try Our Location Tools
Find your IP address, GPS coordinates, and more with our free tools.