User-Agent Parser
Parse user-agent strings to identify browser, OS, device type, and rendering engine instantly in your browser
Paste any user-agent string to parse its components
Parsing User-Agent Strings to Identify Browsers, OS, and Devices
The User-Agent HTTP header identifies the client making a request — but its format is a historical accumulation of compatibility hacks rather than a clean specification. Modern user-agent strings contain nested browser identifiers, rendering engine versions, platform tokens, and mobile indicators packed into a single string that is difficult to parse manually. The User-Agent Parser analyzes any UA string to extract browser name and version, operating system, device type (desktop, mobile, tablet, bot), and rendering engine using pattern matching against known token formats.
Paste any user-agent string to instantly see its components broken down: which browser and version, which OS and version, whether it is a mobile or desktop device, which rendering engine powers it, and whether it is a known bot or crawler. This is essential for debugging browser-specific issues, analyzing access logs, filtering bot traffic, and understanding your audience's technology profile. All parsing happens client-side using regex patterns.
Browser and Version Detection
The parser identifies browsers across all major engines and platforms:
- Chromium-based: Chrome, Edge, Brave, Opera, Vivaldi, Samsung Internet — all share the Chrome version token but have distinct identifiers
- Firefox-based: Firefox, Firefox Focus, Tor Browser — identified by the Gecko engine and Firefox token
- Safari/WebKit: Safari on macOS and iOS, Chrome on iOS (uses WebKit underneath)
- Legacy browsers: Internet Explorer, Edge Legacy (EdgeHTML), Opera Presto
Version extraction handles the varying formats across browsers — Chrome uses simple "Chrome/120.0" while Safari uses "Version/17.0" alongside an AppleWebKit version that is not the browser version.
Device and OS Classification
Operating system and device type detection enables platform-specific debugging:
- Desktop OS: Windows (with version mapping — "NT 10.0" = Windows 10/11), macOS (version extraction), Linux distributions, ChromeOS
- Mobile OS: iOS (iPhone/iPad distinction), Android (version and device model), Windows Phone
- Device type: Desktop, Mobile, Tablet — determined by platform tokens and mobile indicators
- Architecture: x64, ARM, ARM64 when present in the UA string
Bot and Crawler Identification
Distinguishing bots from real users is essential for analytics and access control:
- Search engine bots: Googlebot, Bingbot, Yandex, Baidu Spider, DuckDuckBot
- Social media crawlers: FacebookExternalHit, TwitterBot, LinkedInBot
- Monitoring tools: Pingdom, UptimeRobot, GTmetrix, PageSpeed Insights
- Library defaults: Python-requests, axios, curl, wget — often indicate API clients or scrapers
Bot detection helps separate real user traffic from automated requests in analytics, implement bot-specific responses (pre-rendered pages for SEO bots), and identify potential scraping or abuse patterns. The parser also detects spoofed bot user-agents by checking for inconsistencies in the token ordering and version numbers that real crawlers use, helping identify impersonation attempts that claim to be Googlebot but lack the correct token structure.
Understanding bot traffic composition helps infrastructure teams plan capacity correctly — a site receiving 60% bot traffic may appear to have double the actual user load if bots are not filtered from request metrics.
Code Examples
User-Agent Parse Results
# Input:
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
# Parsed result:
# Browser: Safari 17.0
# Engine: WebKit 605.1.15
# OS: iOS 17.0
# Device: Mobile (iPhone)
# Type: Real user (not a bot)
# Another example:
# Input: Googlebot/2.1 (+http://www.google.com/bot.html)
# Browser: Googlebot 2.1
# Engine: Unknown
# OS: Unknown
# Device: Bot
# Type: Search engine crawler (Google) Frequently Asked Questions
What information can be extracted from a user-agent string?
A user-agent string typically contains the browser name and version, operating system and version, device type (desktop, mobile, tablet, or bot), and the rendering engine (Blink, Gecko, WebKit, or Trident). This tool extracts all of these components.
Why do some browsers report multiple browser names in the user-agent?
Modern browsers include legacy tokens for compatibility. For example, Chrome includes "Safari" and "AppleWebKit" in its UA string because early websites checked for these tokens. Edge includes "Chrome" because it uses the same engine. The parser handles this by checking browsers in specificity order: Edge → Opera → Chrome → Firefox → Safari.
Is my user-agent string sent to any server?
No, all parsing happens entirely in your browser using client-side JavaScript. Your user-agent string never leaves your device, ensuring complete privacy.
How does the parser detect bots and crawlers?
The parser checks for known bot signatures like Googlebot, Bingbot, YandexBot, DuckDuckBot, and others before attempting browser detection. Bot user-agents typically include the bot name followed by a version number.
What are the privacy implications of user-agent strings?
User-agent strings can contribute to browser fingerprinting, allowing websites to track users without cookies. This is why browsers are gradually reducing the information in UA strings through initiatives like User-Agent Client Hints (UA-CH). Chrome has been freezing parts of the UA string since 2022.