Overview
Parse any User-Agent string instantly
Every web request your browser sends carries a User-Agent header: a single line of text that tries to describe the browser, operating system, and device making the request. It is a messy, historically tangled string full of legacy tokens like Mozilla/5.0 and like Gecko that exist purely for backward compatibility. This tool untangles it for you.
Paste a User-Agent string (or click Use my browser to grab your own) and ToolHub breaks it down into browser name and version, operating system, device type, and rendering engine. The breakdown updates live as you type, and everything runs in your browser.
Step-by-step
How to use the User-Agent parser
- 1
Paste a User-Agent string
Drop any User-Agent into the input field. You can copy one from server logs, browser developer tools, or analytics dashboards. - 2
Or use your own browser
Click Use my browser to fill the field with your current navigator.userAgent value automatically. - 3
Read the breakdown
The detected browser, operating system, device type, and rendering engine appear instantly in the labeled list on the right.
Background
What a User-Agent string contains
A typical User-Agent looks like a soup of slash-separated tokens. For example, Chrome on Windows reports something close to Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36. Almost none of that is literally true: Chrome is not Mozilla, not Safari, and not KHTML. These tokens are vestigial, kept so old server-side sniffing code does not break.
Why parsing is heuristic
Because browsers deliberately impersonate each other for compatibility, there is no clean, authoritative grammar for User-Agent strings. Parsers rely on ordered pattern matching: check for the most specific markers first (Edge, Samsung Internet, Opera) before falling back to Chrome or Safari. The order matters because Edge and Opera both include the Chrome/ token.
Rendering engines
Chrome, Edge, Opera, and Samsung Internet all use Blink. Safari and older WebKit browsers use WebKit. Firefox uses Gecko. The engine often matters more than the brand name when you are debugging a rendering or compatibility issue.
Use cases
When to parse a User-Agent
Reading server logs
Turn raw User-Agent lines in access logs into readable browser and OS labels while debugging traffic.
Analytics and segmentation
Understand what browsers and devices your visitors use so you can prioritize testing and support.
Bug reproduction
A user reports a bug and pastes their User-Agent. Decode it to match their exact browser and version.
Bot detection
Spot obvious crawlers and bots whose User-Agent strings advertise themselves as Googlebot, Bingbot, and friends.
Feature gating decisions
Decide whether a quick User-Agent check is enough or whether you should use proper feature detection instead.
QA across devices
Verify that the device type detection (desktop, mobile, tablet) matches what your responsive layout expects.
Tips and best practices
- Prefer feature detection over User-Agent sniffing whenever possible. Test for the capability you need, not the browser brand.
- User-Agent strings can be edited freely. Never trust them for security or access control decisions.
- Modern Chromium browsers freeze and reduce User-Agent detail. Use Client Hints for fine-grained, opt-in device data.
- Order your matching rules from most specific to least specific. Edge and Opera both carry the Chrome token.
- iOS reports its version with underscores (like 17_4). Convert them to dots for a readable version number.
Common questions
Why does Chrome say it is Safari and Mozilla?
Pure backward compatibility. Decades ago, servers sniffed User-Agents to decide which features to serve. To avoid being locked out, each new browser copied the tokens of the popular ones. The result is that almost every browser claims to be Mozilla, and Chromium browsers also carry a Safari token.
Can a User-Agent be faked?
Yes, trivially. Browsers let extensions and developer tools override it, and any HTTP client can send whatever string it wants. That is why User-Agent parsing is a best-effort hint, never proof of identity.
What is the difference between mobile and tablet detection?
The heuristic looks for the Mobile token and device markers. iPads and Android devices without the Mobile token are treated as tablets, while phones that include Mobile are treated as mobile. It is approximate and can misclassify edge cases.
Should I use this for production routing?
For analytics and debugging, yes. For deciding which code path to run, prefer feature detection or the User-Agent Client Hints API, which is structured and harder to get wrong than parsing a free-form string.
100% private