User Agent Parser

Analyze browser User-Agent strings to identify browser, operating system, rendering engine, and device information.

Back to all tools on ToolForge

More in Web & Network



Result


About User Agent Parser

This User-Agent parser analyzes browser identification strings to extract browser name, version, operating system, rendering engine, and device type information. It supports both manual UA string parsing and displays your current browser environment.

It is useful for analytics verification, debugging browser-specific issues, testing responsive designs, analyzing server logs, identifying bot traffic, verifying CDN cache rules, troubleshooting CSS/JS compatibility issues, and understanding what client information websites receive from visitors.

User-Agent String Structure

A typical modern browser User-Agent string follows this pattern:

Chrome on Windows:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36
(KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36

Breakdown:
├── Mozilla/5.0          - Historical compatibility token
├── Windows NT 10.0      - Operating system
├── Win64; x64           - Platform architecture
├── AppleWebKit/537.36   - Rendering engine
├── KHTML, like Gecko    - Engine lineage (for compatibility)
├── Chrome/120.0.0.0     - Browser name and version
└── Safari/537.36        - Safari compatibility token

Firefox on macOS:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:121.0)
Gecko/20100101 Firefox/121.0

Safari on iOS:
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.1

Browser Detection Patterns

Browser Detection Pattern Version Format
Google Chrome Chrome/xyz (not Edg) Chrome/120.0.0.0
Microsoft Edge Edg/xyz Edg/120.0.0.0
Mozilla Firefox Firefox/xyz Firefox/121.0
Apple Safari Safari/xyz (no Chrome) Version/17.0
Opera OPR/xyz OPR/105.0.0.0
Samsung Internet SamsungBrowser/xyz SamsungBrowser/23.0

Operating System Detection

OS UA Pattern Version Example
Windows 10/11 Windows NT 10.0 Windows NT 10.0; Win64; x64
macOS Mac OS X xyz Mac OS X 10_15_7
Linux Linux; x86_64 Linux x86_64
Android Android xyz Android 14
iOS iPhone OS xyz iPhone OS 17_0 like Mac OS X
ChromeOS CrOS xyz CrOS 15639.0.0

Device Type Detection

Desktop:
  - No "Mobile" or "Android" with "Mobile"
  - Typically: Windows, macOS, Linux

Mobile Phone:
  - iPhone → "iPhone" in UA
  - Android Phone → "Android" + "Mobile"
  - Windows Phone → "Windows Phone" (legacy)

Tablet:
  - iPad → "iPad" in UA
  - Android Tablet → "Android" without "Mobile"
  - Some tablets spoof desktop UA (iPadOS 13+)

Bot/Crawler:
  - Contains "bot", "crawler", "spider"
  - Examples: Googlebot, Bingbot, DuckDuckBot
  - Often missing typical browser tokens

Common Use Cases

Rendering Engine Reference

Engine Used By UA Token
Blink Chrome, Edge, Opera, Brave AppleWebKit/537.36
Gecko Firefox, Firefox Focus Gecko/20100101
WebKit Safari, iOS Safari AppleWebKit/605.x
Trident Internet Explorer 11 (legacy) Trident/7.0

Navigator API Properties

Beyond User-Agent parsing, JavaScript provides additional browser information:

navigator.userAgent        - Full UA string
navigator.platform         - OS platform (Win32, MacIntel, Linux x86_64)
navigator.language         - Primary language (en-US, zh-CN)
navigator.languages        - Preferred languages array
navigator.cookieEnabled    - Cookies enabled (true/false)
navigator.onLine           - Online status (true/false)
navigator.hardwareConcurrency - CPU cores (4, 8, 16)
navigator.deviceMemory     - RAM in GB (4, 8, 16) - Chromium only
navigator.maxTouchPoints   - Touch support (0 = no touch)
navigator.webdriver        - Automation detection (true = Selenium/Puppeteer)

Bot Detection Patterns

Search Engine Bots:
  Googlebot:    Googlebot/2.1 (+http://www.google.com/bot.html)
  Bingbot:      Mozilla/5.0 (compatible; bingbot/2.0; ...)
  DuckDuckBot:  DuckDuckBot/1.0 (+http://duckduckgo.com/duckduckbot.html)

Social Media Bots:
  Facebook:     facebookexternalhit/1.1
  Twitter:      Twitterbot/1.0
  LinkedIn:     LinkedInBot/1.0

SEO/Analytics Bots:
  AhrefsBot:    AhrefsBot/7.0
  SemrushBot:   SemrushBot/7.0
  MJ12bot:      MJ12bot/v1.4.8

Note: Some bots now use full browser UA strings to appear as real users.
Check for missing interactive features or use bot detection services.

Limitations and Considerations

Frequently Asked Questions

What is a User-Agent string?
A User-Agent string is a text identifier sent by browsers with every HTTP request. It contains browser name/version, operating system, rendering engine, and sometimes device info. Example: 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36'. Servers use this for analytics, content negotiation, and browser-specific fixes.
How do I parse a User-Agent string?
User-Agent parsing uses regex patterns to identify known browser signatures. Chrome includes 'Chrome/xyz' and 'AppleWebKit', Firefox has 'Firefox/xyz', Safari has 'Safari/' without 'Chrome', Edge has 'Edg/'. OS detection looks for 'Windows NT', 'Mac OS X', 'Linux', 'Android', 'iPhone'. The order matters—check Edge before Chrome since Edge also contains 'Chrome'.
Why do User-Agent strings look so complex?
User-Agent strings are complex for historical compatibility. They include legacy identifiers (Mozilla/5.0) to avoid breaking old sites that did browser sniffing. Each browser adds its own tokens plus rendering engine info (AppleWebKit, Gecko, Trident). This results in long strings like 'Mozilla/5.0... AppleWebKit... Chrome... Safari' even though it's just Chrome.
What is User-Agent spoofing?
User-Agent spoofing is when a browser or tool sends a fake User-Agent string. Developers spoof to test how sites respond to different browsers. Some users spoof for privacy (blending into the crowd). Malicious actors may spoof to bypass browser-specific security rules. Never trust User-Agent for security decisions—use feature detection instead.
What information can I get from User-Agent?
From User-Agent you can detect: browser name and version, operating system and version, rendering engine (WebKit, Gecko, Trident), device type (mobile, tablet, desktop), and sometimes device model. You cannot reliably get: screen size, installed plugins, JavaScript support, or precise hardware specs. For feature detection, use Modernizr or feature queries instead.
What is User-Agent Client Hints?
User-Agent Client Hints (UA-CH) is a privacy-focused replacement for traditional User-Agent strings. Instead of sending full UA with every request, browsers send minimal info by default. Sites request specific data (browser version, OS, architecture) via HTTP headers or JavaScript APIs. This reduces fingerprinting surface while still enabling browser-specific functionality.