Free Converter

User-Agent Parser

Parse any User-Agent string to detect browser, OS, device type, and rendering engine. Free, instant, and fully client-side.

About User Agent String Parsing

The User-Agent string is an HTTP header browsers and other clients send to identify themselves to servers. Originally a brief identifier, modern user agents are sprawling concatenations of historical version strings designed for backward compatibility with sites that sniff for specific browsers. A typical Chrome user agent today references Mozilla, AppleWebKit, KHTML, Gecko, Chrome, and Safari — most of which are vestigial.

Parsing a user agent extracts the actual browser, version, OS, and device type from this dense string. The data informs analytics, feature detection, and bot identification. It is also imperfect — user agents can be spoofed, misrepresent the actual browser engine, or fall behind reality (Chrome on iOS reports as Safari because all iOS browsers must use WebKit).

This parser uses pattern matching to identify common browsers, operating systems, and device categories from the user agent string. Output includes browser name and version, operating system and version, device type (desktop, mobile, tablet, bot), and rendering engine. Parsing happens in your browser; no data is sent anywhere.

Why Parse User Agents

Analytics, debugging, and security workflows all benefit from extracting structured data from raw user agent strings. Server logs containing millions of user agents become tractable when each is parsed into browser/OS/device fields. Bug reports listing user agents are easier to act on when you can quickly see what browser and version is involved.

Bot detection also relies on user agent parsing as a first signal. Many crawlers identify themselves honestly (Googlebot, Bingbot, GPTBot); others spoof Chrome but include subtle hints. Parsing helps surface these patterns.

How to Parse a User Agent

Paste a user agent, see the structured data.

  1. Paste the user agent: Copy the User-Agent string from server logs, browser dev tools, or analytics data. Long strings are truncated for display but parsed in full.
  2. Parse: The tool matches the string against known patterns and extracts browser, OS, version, device type, and rendering engine.
  3. Inspect the output: Each parsed field is shown separately. Confidence indicators flag fields where the user agent is ambiguous (e.g., Chrome on iOS).
  4. Use the structured data: Use the parsed fields for analytics grouping, debugging context, or feature detection logic. For dispatch decisions in code, prefer feature detection over user agent strings.

Common Use Cases

Technical Details

User-Agent parsing is fundamentally pattern-matching against a large library of regex rules. Browser detection uses substrings (Chrome, Firefox, Safari, Edge), OS detection looks for platform tokens (Windows NT 10.0, Mac OS X, Linux, Android, iPhone OS), and device detection combines OS with form-factor hints.

Order matters in parsing. Edge user agents include Chrome and Safari tokens, so checking for Edge must happen before Chrome. Brave, Vivaldi, and Opera all fork Chromium and have similar issues. Mature parsing libraries (ua-parser-js, ua-parser) maintain rule lists ordered for correct disambiguation.

User-Agent Client Hints (UA-CH) is the modern replacement: structured Sec-CH-UA headers replace the legacy User-Agent. Browsers are gradually freezing the legacy string and migrating to UA-CH. New parsing should support both.

Best Practices

Frequently Asked Questions

Why is the user agent string so long?
Historical compatibility. Sites in the 1990s and 2000s checked for specific browser tokens before serving features. Browsers added more identifiers over time to satisfy these checks while still being correctly identified by newer code. The result is a long concatenation of legacy tokens.
Why does Chrome on iOS show as Safari?
iOS requires all browsers to use the WebKit engine. Chrome on iOS is technically a WebKit-based browser with a Chrome-style UI. Its user agent reflects the underlying engine. The same applies to Firefox, Edge, and other iOS browsers.
Can user agents be spoofed?
Yes, trivially. Browsers offer settings to change the user agent; HTTP clients can set it to any value. Treat user agents as informational, not as authentication.
What about Client Hints?
Sec-CH-UA and related headers are the modern, structured replacement for the legacy User-Agent. Modern Chromium browsers send Client Hints alongside the legacy header. New code should prefer Client Hints when available.
How accurate is bot detection based on user agent?
Honest crawlers identify themselves (Googlebot, GPTBot, Bingbot). Malicious bots spoof Chrome or Firefox. User-agent-based bot detection catches the honest ones but misses the rest; combine with behavioral signals for full detection.
Why does a user agent show two version numbers?
Browser version, engine version, OS version, mobile device version — modern user agents include several. Each appears in its own token. Parsing extracts each separately.
Is parsing done in my browser?
Yes. The user agent string is parsed locally; no data is sent to any server.
What about mobile vs tablet detection?
User agents typically include Mobile or Tablet hints (or screen size in Client Hints). Parsing extracts these into a device category. Edge cases (Android tablets without Mobile token, foldable devices) are still imperfect.