What Is My User Agent? How to Check It and Why It Matters
Every time you load a page, your browser introduces itself. That introduction is the user agent string — a line of text attached to HTTP requests so servers know what kind of client is asking.
People search “what is my user agent” when a support page asks them to copy it, when a site behaves differently on mobile, or when they are debugging layout issues. This guide covers what the string contains, how to read yours, and what developers actually do with the data.
What the user agent string looks like
A typical Chrome on Windows string might look like this:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36
(KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36
Broken down:
| Segment | Meaning |
|---|---|
Mozilla/5.0 | Historical compatibility token (almost all browsers include it) |
Windows NT 10.0; Win64; x64 | OS and CPU architecture |
AppleWebKit/537.36 | Rendering engine lineage |
Chrome/131.0.0.0 | Browser name and version |
Safari/537.36 | Another legacy compatibility token |
Mobile strings add device hints (Mobile, iPhone, Android). The exact format varies by browser — Huntress notes that security teams also watch for odd UAs (headless browsers, missing UAs, outdated IE strings) in server logs.
How to check your user agent
Method 1: Browser Console (fastest)
- Press F12 (or right-click → Inspect).
- Open the Console tab.
- Type:
navigator.userAgent
Press Enter. The full string prints immediately. This is the same value sent in HTTP headers for requests from that tab.
Method 2: Network tab (see real requests)
WebToNative’s developer guide walks through this flow:
- Open DevTools → Network.
- Reload the page.
- Click any request (the main document is fine).
- Open Headers → Request Headers.
- Find User-Agent.
This shows exactly what left the browser for that request, including any extensions that modify headers.
Method 3: Online detector pages
Sites like WhatIsMyBrowser.com display parsed results (browser name, OS, device). Useful for non-developers; developers usually prefer navigator.userAgent or DevTools for copy-paste accuracy.
Method 4: Server-side (your own site)
If you control the backend:
// Node.js / Express
const ua = req.headers['user-agent'];
// PHP
$ua = $_SERVER['HTTP_USER_AGENT'];
Why developers care
Responsive layouts — Older patterns used UA sniffing to serve mobile sites. Modern practice prefers CSS media queries and Client Hints, but legacy code still checks UA strings.
Feature support — Some APIs or formats are gated by browser version parsed from the UA (though feature detection is safer).
Analytics — Traffic reports group sessions by browser and OS parsed from UA.
Bot detection — Scrapers often use default or empty UAs. Browse AI’s glossary explains that mismatched or outdated UAs can trigger blocks.
Debugging — “Works on my machine” often means “works in my browser.” Support tickets asking for UA help narrow that down.
User agent vs Client Hints
The UA string is a single unstructured line. Client Hints (Sec-CH-UA-* headers) let servers request specific facts (browser brand, version, platform) in a more structured way. Chrome has been reducing passive UA granularity over time. For new projects, do not rely only on regex parsing of navigator.userAgent — combine with feature tests.
Changing your user agent (testing)
Chrome DevTools: ⋮ menu → More tools → Network conditions → User agent → uncheck “Use browser default” and pick a preset or custom string.
Extensions: “User-Agent Switcher” style extensions for quick mobile/desktop toggles.
Automation: Playwright and Puppeteer set UA per context for E2E tests.
Spoofing is legitimate for QA. It is not a privacy or security tool for everyday browsing.
Try it with a tool
Our UA Display tool parses the current browser’s user agent locally — no data is sent to a server. Handy when you need a readable breakdown without opening DevTools.
Common questions
Does a VPN change my user agent?
No. VPN changes IP and location routing, not the UA string.
Why does everyone start with Mozilla?
Historical reasons from the browser wars. New browsers kept the token so servers would not block them.
Should I hide my user agent?
You cannot browse the normal web without sending one. Privacy-focused browsers may trim details; extensions can spoof values. For typical users, awareness is enough.
Related
- UA Display tool — parse your UA in the browser
- User agent detection methods (JA) — Japanese companion article
- All developer tools