User Agent Parser

Detect the browser, operating system, and device from a user-agent string.

A user-agent string is the line a browser sends to say what it is, and it's famously messy. This tool breaks one down into browser and version, operating system, device type and rendering engine, and flags crawlers. Yours is filled in when you arrive, so you can see what your own browser reveals.

How to use it

  1. Look at the string already in the box, or paste another.
  2. Read the browser, system and device.
  3. Check the bot flag.
  4. Try the example to see a mobile one.

When it helps

  • Reading web server logs.
  • Chasing a bug that only affects some browsers.
  • Seeing what information your browser shares.
  • Identifying crawlers.

Good to know

  • Anyone can change their user-agent, so never use it for security.
  • Windows 10 and 11 report the same version in many browsers, so the tool says "10 or 11".
  • Newer browsers are deliberately reducing the detail they send.

What a user agent contains

A user-agent string typically lists the browser name and version, the rendering engine, and the operating system and device. For historical reasons, almost all begin with Mozilla/5.0, and many mention several browsers, because sites once served different pages depending on what they saw.

That is why Chrome's string includes Safari and Gecko: each was added so sites would treat it as compatible.

Worked example: a log entry

A string containing iPhone, Mobile and Safari means an iPhone browsing with Safari or a browser built on Apple's engine. One with Android and Chrome but no Mobile suggests a tablet. A string with Googlebot identifies a crawler, though anyone can claim that name.

The parser reports its best guess, with a bot flag when the string looks like a crawler.

Privacy and the future

User-agent strings contribute to browser fingerprinting, so browsers are reducing the detail they share, with a newer mechanism called client hints giving sites information only when requested. Expect strings to become more generic.

For analytics, rely on features, not on user-agent sniffing. Test whether the feature you need is available instead of guessing from the browser name.

Bots and crawlers

Crawlers identify themselves in user-agent strings, such as Googlebot or Bingbot, but any program can claim those names. To verify a crawler, check its IP address against the search engine's published ranges or do a reverse DNS lookup.

Don't block unknown agents blindly, since that may stop helpful services such as link previews from working.

Reading a string yourself

Look for the parts in order: the platform in brackets, such as Windows NT 10.0 or Linux; Android; then the engine, such as AppleWebKit; and finally the browser and version. Edge adds Edg/ at the end, Opera OPR/, and Chrome on iPhone shows CriOS.

That order trick helps you identify a browser even when a parser isn't to hand.

Questions

Why does my Mac look like it's running an old version?

Browsers freeze that number for compatibility.

Is the string sent anywhere?

No, it's parsed in your browser.