Free tools / no signup needed

User-Agent Parser and Decoder

Paste a user-agent string to decode the browser, OS and device behind it, and check whether it looks like a bot. Uses FocusStat's production parser, entirely in your browser.

Paste a UA string, use your own, or pick an example.

What a user-agent string is

Every HTTP request carries a User-Agent header: a short string identifying the browser and platform, like Mozilla/5.0 (iPhone; CPU iPhone OS 17_5…) Safari/604.1. Servers and analytics tools parse it to report browsers, operating systems and device classes, and to filter out crawler traffic.

The format is famously messy for historical reasons: nearly every browser claims to be Mozilla, Chrome-based browsers also claim Safari, and Edge claims all three. Parsers work by checking the most specific markers first, which is what this tool does. Modern Chromium browsers additionally send structured Client Hints (Sec-CH-UA headers) that are much cleaner; good analytics prefers those and falls back to the UA string.

Bots and crawlers

Well-behaved bots identify themselves: Googlebot, Bingbot, GPTBot (OpenAI's crawler), ClaudeBot, PerplexityBot, plus uptime monitors and SEO crawlers. Automation tools (HeadlessChrome, curl, python-requests) are detectable too. Analytics that doesn't filter these inflates every number you care about, which is why FocusStat drops known bots at ingestion and reports them separately.

Parsing user agents in Python and JavaScript

If you need this in code rather than in a browser tab, do not write regexes yourself. Both ecosystems have a maintained parser built on a shared, regularly updated list of browser and device patterns.

Python

pip install ua-parser

from ua_parser import parse

ua = parse("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")

print(ua.user_agent.family, ua.user_agent.major)  # Mobile Safari 17
print(ua.os.family, ua.os.major)                  # iOS 17
print(ua.device.family)                           # iPhone

JavaScript and Node

npm install ua-parser-js

import { UAParser } from "ua-parser-js";

const { browser, os, device } = UAParser(req.headers["user-agent"]);
console.log(browser.name, browser.version); // Mobile Safari 17.5
console.log(os.name, os.version);           // iOS 17.5
console.log(device.type);                   // mobile

Neither library flags bots, which is the half that matters for analytics. Keep a separate list of crawler markers (Googlebot, GPTBot, HeadlessChrome, python-requests and friends) and check it first, exactly as the tool above does.

Frequently asked questions

Why do all user agents start with Mozilla/5.0?

Backwards compatibility from the 1990s browser wars: servers used to send better pages to Netscape (Mozilla), so every other browser started claiming to be Mozilla, and nobody could ever stop. It carries no meaning today.

Can the user agent identify a specific person?

Not on its own; thousands of people share any given browser/OS combination. Combining it with many other signals for tracking is called fingerprinting, which privacy-focused analytics (including FocusStat) deliberately avoids.

What is GPTBot?

OpenAI's web crawler, used to gather training and search data. It identifies itself in the user agent and respects robots.txt. Anthropic's ClaudeBot and Perplexity's PerplexityBot are equivalents; all are classified as known bots here.

Is the user agent going away?

Chromium has frozen and reduced UA detail in favor of User-Agent Client Hints, which report browser, platform and mobile-ness in structured headers on request. The UA string still exists but carries less version detail than it used to.