Skip to content

User Agent Parser

Embed

Paste this where you want User Agent Parser on your site. Adjust the height to fit.

<iframe src="https://www.browserutils.dev/embed/user-agent-parser/" width="100%" height="500" frameborder="0" loading="lazy" title="User Agent Parser"></iframe>
<p style="font-size:12px;margin:4px 0 0"><a href="https://www.browserutils.dev/tools/user-agent-parser/">User Agent Parser</a> by BrowserUtils</p>

Parse user agent strings into components.Runs in this tab.

Your browser's user agent is auto-filled above. Paste any UA string to parse it.

How to use User Agent Parser

  1. The User Agent String field is filled with this browser's navigator.userAgent when the page loads. That is the raw string this tab is sending.
  2. Paste any other string over it. The parser shows Browser, Rendering Engine, Operating System, Device Type, and Mobile.
  3. There is no lookup database and no search across user agents. It only parses the string in the field. The guide below walks through real strings, including the ones this parser gets wrong.

A user agent string, token by token

Current Chrome on Windows sends:

Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.0.0 Safari/537.36
Token What it means
Mozilla/5.0 Compatibility token. Netscape-era servers sent their best pages only to “Mozilla”, so every browser since claims to be one. It carries no information.
(Windows NT 10.0; Win64; x64) Platform. Windows 11 still says NT 10.0, which is why this parser shows Windows 10/11.
AppleWebKit/537.36 Blink forked from WebKit in 2013 and froze this value. The parser labels it Blink 537.36.
(KHTML, like Gecko) WebKit began as KDE’s KHTML; “like Gecko” got it pages written for Firefox.
Chrome/130.0.0.0 The actual browser. Only the major version is real.
Safari/537.36 Keeps Safari-sniffing sites from locking Chrome out.

Edge appends Edg/130.0.0.0 and Opera appends OPR/115.0.0.0 to that same string. Since nearly every Chromium browser also says “Chrome” and “Safari”, check order decides the answer. This parser checks Edge, Opera, Vivaldi, Brave and Firefox first, then Safari, then Chrome.

What this parser returns for real strings

User agent (abridged) Browser Engine OS Device
(Linux; Android 10; K) … Chrome/130.0.0.0 Mobile Safari/537.36 Chrome 130.0.0.0 Blink 537.36 Android 10 Mobile
Same string without Mobile Chrome 130.0.0.0 Blink 537.36 Android 10 Tablet
(iPhone; CPU iPhone OS 17_5 like Mac OS X) … Version/17.5 … Safari/604.1 Safari 17.5 WebKit 605.1.15 iOS 17.5 Mobile
Chrome on iPhone (CriOS/130.0.6723.90) Safari WebKit 605.1.15 iOS 17.5 Mobile
(Windows NT 10.0; Win64; x64; rv:132.0) Gecko/20100101 Firefox/132.0 Firefox 132.0 Gecko 20100101 Windows 10/11 Desktop
curl/8.7.1 Unknown Unknown Unknown Desktop

Gotchas:

  • Every iOS browser is WebKit. This parser has no rule for CriOS or FxiOS, so Chrome and Firefox on iOS come out as Safari with no version.
  • iPads usually look like Macs. iPadOS Safari requests desktop sites by default and sends Macintosh; Intel Mac OS X 10_15_7, which parses as macOS, Desktop. In the browser, navigator.maxTouchPoints > 1 on a “Mac” is the usual tell.
  • Gecko/20100101 is a frozen date. Desktop Firefox’s real engine version is rv:132.0.
  • Device Type falls back to Desktop, so curl and other non-browser clients read as Unknown on Desktop.
  • Brave sends a stock Chrome UA and parses as Chrome.

Bots and crawlers

The Bot/Crawler label means the string contains bot, crawler, spider or slurp (any case). That catches Googlebot, bingbot and GPTBot, but not facebookexternalhit. The bot check runs after the mobile check, so Googlebot Smartphone (Android … Mobile) shows as Chrome on Android, Mobile. Desktop Googlebot shows as Bot/Crawler.

Anyone can send a Googlebot UA. To verify one, do a reverse DNS lookup on the IP, then a forward lookup on the hostname it returns:

host 66.249.66.1
# 1.66.249.66.in-addr.arpa domain name pointer crawl-66-249-66-1.googlebot.com.
host crawl-66-249-66-1.googlebot.com
# crawl-66-249-66-1.googlebot.com has address 66.249.66.1

robots.txt rules match the product token (Googlebot), not the full string. The robots.txt generator writes those rules.

UA reduction: what Chrome no longer tells you

Chrome 101 zeroed the minor, build and patch numbers. Chrome 107 froze the desktop platform section and Chrome 110 froze Android’s. Whatever the real OS, Chrome sends one of these:

Platform Frozen value
Windows Windows NT 10.0; Win64; x64
macOS Macintosh; Intel Mac OS X 10_15_7 (Apple Silicon too)
Linux X11; Linux x86_64
ChromeOS X11; CrOS x86_64 14541.0.0
Android Linux; Android 10; K (model is always K)

So the brand, major version, OS family and mobile flag are still reliable. OS version, device model, CPU architecture and full browser version aren’t. Safari also reports 10_15_7 whatever the macOS release.

User-Agent Client Hints

Chromium-based browsers (Chrome, Edge, Opera) send these on every HTTPS request:

Sec-CH-UA: "Chromium";v="130", "Google Chrome";v="130", "Not?A_Brand";v="99"
Sec-CH-UA-Mobile: ?0
Sec-CH-UA-Platform: "Windows"

The Not?A_Brand entry is deliberate noise (“GREASE”) whose spelling changes between releases, so parse the list and don’t string-match it. To get detailed hints, send Accept-CH: Sec-CH-UA-Platform-Version, Sec-CH-UA-Model, and later requests will include them. In JavaScript:

const { platformVersion } = await navigator.userAgentData
  .getHighEntropyValues(['platformVersion']);
// Windows: 13.0.0 and up is Windows 11; 1.0.0 to 10.0.0 is Windows 10

Firefox and Safari don’t send Client Hints, so keep a UA fallback. This tool reads the User-Agent string only. To see your own hints, run navigator.userAgentData in a Chromium console.

Parsing user agents in code

import { UAParser } from 'ua-parser-js';
const { browser, os, device } = UAParser(req.headers['user-agent']);
// Android 10; K → "Mobile Chrome", os.version "10", device.type "mobile", device.model "K"
from user_agents import parse  # pip install user-agents
ua = parse(request.headers["User-Agent"])
print(ua.browser.family, ua.os.family, ua.is_mobile, ua.is_bot)

ua-parser-js 2.x is AGPL-3.0 (1.x is MIT), which matters for closed-source servers. The Python library sets is_mobile and is_bot separately, and both are True for Googlebot Smartphone. To test your server against a given client, run curl -A '<user agent>' https://example.com/. cURL to Code turns that command into fetch or requests code. The HTTP headers reference covers User-Agent and related headers.

Next step

Questions

What is an online user agent parser?
Paste a User-Agent string and read the browser, engine, OS, and device this page extracts from it. On load the field already holds the raw user agent of the browser you have open. Replace it to parse a different one.
What is a raw user agent?
It is the full User-Agent header text, such as the Chrome on Windows string in the guide. This page does not look that string up in a catalog. The parsed rows are a reading of the tokens you pasted.
Why does Chrome on iPhone come out as Safari?
The parser has no rule for CriOS or FxiOS. Chrome and Firefox on iOS are WebKit browsers, and this page labels them Safari with no version. An iPad that sends a desktop Macintosh string is parsed as macOS, Desktop.

More in Web & Networking

All 23 web & networking