FormatterHQ

User Agent Parser

Paste one or more user agent strings to see the browser and version, rendering engine, operating system, device type, CPU architecture and whether it is a bot.

Input TEXT
Output TEXT
Ready.

How to use the User Agent Parser

  1. Paste a user agent string, or many strings with one per line (for example from a server log).
  2. The parser identifies each string immediately.
  3. Read the browser, engine, OS, device type, device model, CPU and bot fields.
  4. Copy the results or explore the structured output.

What is a user agent string?

Every browser and HTTP client sends a User-Agent header describing itself. For historical reasons these strings are long and confusing: nearly every browser claims to be "Mozilla/5.0", Chrome mentions Safari, and Edge mentions Chrome. This user agent parser reads the whole string and works out what the client really is.

Example

Mozilla/5.0 (iPhone; CPU iPhone OS 17_5 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.5 Mobile/15E148 Safari/604.1
Browser        Mobile Safari 17.5
Engine         WebKit 605.1.15
OS             iOS 17.5
Device type    mobile
Device         Apple iPhone
CPU            —
Bot / crawler  no

What the user agent parser detects

  • Browser and version – Chrome, Edge, Firefox, Safari, Opera, Samsung Internet and others, plus tools and libraries such as curl.
  • Rendering engine – Blink, WebKit or Gecko.
  • Operating system – Windows, macOS, iOS, iPadOS, Android, Linux distributions, Chrome OS and more, with versions where available.
  • Device type – desktop, mobile, tablet, smart TV, console, bot, or a library/CLI client.
  • Device vendor and model – for example Apple iPhone, or Samsung and Google Pixel models on Android.
  • CPU architecture – amd64, arm64, arm or ia32 when the string reveals it.
  • Bots and crawlers – Googlebot, Bingbot, social media preview fetchers, SEO crawlers and AI crawlers are flagged.

Reading a desktop Chrome user agent

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

Only two tokens really matter here: Windows NT 10.0; Win64; x64 (64-bit Windows 10 or 11) and Chrome/126.0.0.0. "AppleWebKit" and "Safari" are compatibility leftovers, and the minor version numbers are zeroed out on purpose to reduce fingerprinting. The parser reports this as Chrome 126 with the Blink engine on Windows 10/11, amd64.

Common uses

  • Log analysis – paste user agents from access logs (up to 100 at once) to see which browsers and devices your visitors use.
  • Bug reports – decode the user agent a customer sent to find their exact browser and OS version.
  • Bot filtering – check whether suspicious traffic claims to be a crawler.
  • Testing – verify that your own device detection logic agrees with an independent parser.

Batch parsing

Paste user agents from a log export, one per line, and each is parsed separately with a divider between results. That makes it easy to spot the unusual entries, such as outdated browsers or scripted clients, in a sample of traffic.

Limits you should know

  • User agents can be faked. Any client can send any string, so a "Googlebot" user agent does not prove the request came from Google. Verify real crawlers with a reverse DNS lookup; the IP to hostname tool helps.
  • Reduced user agents. Chrome and other browsers now freeze parts of the string: Windows 11 still reports "Windows NT 10.0" (shown here as Windows 10/11), macOS versions are frozen at 10_15_7, and Android device models may be replaced by "K". iPads usually request desktop sites with a Mac user agent. Newer detail is available through User-Agent Client Hints instead.
  • Prefer feature detection. For deciding what your site should do, test for the feature (for example with 'share' in navigator) rather than the browser name.

To see your own browser's user agent, run navigator.userAgent in the JavaScript tester and paste the result here. Parsing happens entirely in your browser.

User agent parser in Python

The standard library has nothing for this, and matching substrings yourself goes wrong quickly: a Chrome user agent also contains Safari and AppleWebKit, so a test like "Safari" in ua misidentifies it. The user-agents package builds on the ua-parser rule set and returns the browser, operating system and device, plus the flags is_mobile, is_tablet, is_pc and is_bot. Parse the string once and read the attributes; the browser version is available as a tuple in version and as text in version_string.

# pip install user-agents
from user_agents import parse

strings = [
    "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36",
    "Mozilla/5.0 (iPhone; CPU iPhone OS 17_5 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.5 Mobile/15E148 Safari/604.1",
    "Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)",
]

for s in strings:
    ua = parse(s)
    print(ua.browser.family, ua.browser.version_string, "|",
          ua.os.family, ua.os.version_string, "|", ua.device.family,
          "| mobile:", ua.is_mobile, "bot:", ua.is_bot)
# Chrome 126.0.0 | Windows 10 | Other | mobile: False bot: False
# Mobile Safari 17.5 | iOS 17.5 | iPhone | mobile: True bot: False
# Googlebot 2.1 | Other  | Spider | mobile: False bot: True

For a single string from a log line, pasting it above is quicker, and it gives a second opinion when the library answers Other.

Frequently asked questions

Why does every user agent start with Mozilla/5.0?
It is a historical artifact. Early websites served better pages to Netscape (Mozilla), so other browsers copied the token to avoid being blocked, and it has stayed ever since.
Can a user agent string be trusted?
No. Clients can send any user agent they like, so treat it as a hint. Verify important claims, such as a request being from Googlebot, with reverse DNS.
Why is Windows shown as "10/11"?
Browsers report Windows NT 10.0 for both Windows 10 and Windows 11, so the user agent alone cannot tell them apart. Only User-Agent Client Hints can distinguish Windows 11.
How do I find my own user agent?
Run navigator.userAgent in your browser’s console or in the JavaScript tester on this site, then paste the result into the parser.
Can I parse user agents from a log file?
Yes. Paste up to 100 user agent strings, one per line, and each is parsed separately.

Last updated October 3, 2026

Related tools

Cron Expression Parser Translate cron expressions into plain English and list the next 10 run times. Supports macros, seconds fields and Quartz syntax. URL Parser Break a URL into scheme, host, port, path, query parameters and fragment. Decodes values and parses many URLs at once. vCard QR Code Generator Put your contact details in a vCard QR code for business cards and badges: name, company, phone, e-mail, website and address. What Is My Screen Resolution? See your screen resolution, browser viewport size, device pixel ratio, colour depth and media-query features instantly. WhatsApp Link Generator Create a wa.me click-to-chat link with a pre-filled message for your website, e-mail signature or QR code. Wi-Fi QR Code Generator Make a Wi-Fi QR code so guests can join your network by scanning — SSID, password and security type, printable PNG or SVG. API Tester (REST Client) Send GET, POST, PUT, PATCH and DELETE requests to REST APIs from your browser and inspect status, headers and pretty-printed JSON. Barcode Generator Generate Code 128, EAN-13, UPC-A, Code 39, ITF-14, ISBN, Data Matrix, PDF417 and more barcodes. Download PNG or SVG for free. Basic Auth Header Generator Build an HTTP "Authorization: Basic" header from username:password, or decode an existing Basic auth header back to credentials. Broken Link Checker Find broken links on a web page: every link is checked and 404s, errors and redirects are listed. Chmod Calculator Convert Linux file permissions between octal (755) and symbolic (rwxr-xr-x) with checkboxes, including setuid, setgid and sticky bits. Crontab Generator Build a crontab line from presets or custom fields, with a plain-English explanation and a preview of the next run times.