User-Agent Parser

Parse User-Agent strings to identify browser, OS, and device

Mozilla/5.0...
Loading editor...

User-Agent Parser — Detect Browser, OS & Device from UA Strings

Understanding the Basics

The User-Agent HTTP request header is a string sent by HTTP clients (browsers, crawlers, API clients, mobile apps) identifying themselves to servers, allowing servers to tailor responses to client capabilities and characteristics. A typical browser User-Agent string like "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36" is remarkably complex — it contains historical tokens (Mozilla/5.0 appears in every browser's UA for legacy compatibility reasons), the operating system and version, the rendering engine (AppleWebKit), the browser engine compatibility claims (KHTML, like Gecko — added because servers once served different content to non-Gecko browsers), and finally the actual browser name and version. User-Agent strings are used for: browser-specific feature detection fallbacks, analytics (tracking browser/OS market share), bot detection (blocking scrapers while allowing Googlebot), responsive content serving, debugging support tickets, and A/B testing by platform. However, UA strings are easily spoofed — they should never be used for security decisions. The evolving "User-Agent Reduction" initiative in Chrome aims to freeze much of the UA string and move capability signaling to the Client Hints API (Sec-CH-UA headers).

How to Use the Tool

  1. The tool automatically detects and displays your own browser's User-Agent string on page load.
  2. Paste any User-Agent string into the input field to analyze a different client.
  3. The parser identifies the browser name and version, rendering engine, operating system, CPU architecture, and device type (desktop/mobile/tablet).
  4. Each detected component is shown in a structured breakdown panel.
  5. Bot/crawler detection identifies known automated agents (Googlebot, Bingbot, curl, Postman, etc.).

Key Features & Specifications

  • Parses User-Agent strings using the ua-parser-js library for broad device/browser coverage
  • Identifies: browser name & version, rendering engine, OS name & version, CPU architecture, device type and vendor
  • Detects common bots and crawlers: Googlebot, Bingbot, Slackbot, Twitterbot, curl, Postman, etc.
  • Shows your own current browser UA string automatically for quick reference
  • Displays raw UA string alongside parsed components for debugging

Frequently Asked Questions (FAQ)

Q:Why do all browsers say "Mozilla/5.0" in their User-Agent?
This is a historical artifact. Early web servers sent different content to Netscape Navigator (Mozilla) vs other browsers. Internet Explorer included "Mozilla/4.0" to impersonate Netscape and get the same content. WebKit-based browsers added "Mozilla/5.0" for the same reason. This snowballed over decades — today every browser claims to be "Mozilla/5.0" regardless of actual Mozilla relationship.
Q:Can I reliably use User-Agent strings to detect mobile devices?
For basic detection, yes — UA strings typically contain "Mobile" for mobile browsers. However, UA strings can be spoofed and some mobile browsers request desktop UAs. For feature detection in web apps, prefer CSS media queries (screen width, pointer type) and the Navigator.userAgentData Client Hints API over UA string parsing.
Q:What is "User-Agent Reduction" in Chrome?
Chrome is phasing in User-Agent Reduction (starting Chrome 101) to freeze most of the UA string and prevent cross-site tracking via UA fingerprinting. The frozen UA will report a generic OS version rather than the exact version. The replacement is the User-Agent Client Hints API (navigator.userAgentData), which provides structured, privacy-preserving access to device information.