decoder.tools

User-Agent Parser

Break a User-Agent string down into browser, engine, OS and device.

live · client-sideNetwork, System & Packetsfree · no sign-up
RAW INPUT
DECODED

Output appears here as you type — decoded on your device.

Input is processed on your device. Nothing you paste is sent anywhere.

What is the User-Agent Parser?

A User-Agent parser interprets the User-Agent HTTP header — a string every browser sends identifying itself — extracting the actual browser, its version, the rendering engine and the operating system from a format thick with historical compatibility tokens.

User-Agent strings are an accident of history. Nearly every browser still begins with 'Mozilla/5.0' because early servers sniffed for it, and Chrome's string names Safari and KHTML for the same reason. The result is a header where almost every token is a compatibility claim rather than a fact, and parsing it means knowing which tokens to believe.

The reliable signals are the later ones: 'Chrome/120' before 'Safari' means Chrome; 'Version/17' before 'Safari' with no Chrome token means real Safari; 'Firefox/121' means Firefox; 'Edg/120' means Edge. Getting this wrong is how sites end up serving Safari-specific workarounds to Chrome.

The header is also being deliberately wound down. Chrome now freezes and reduces the detail it reports, moving to Client Hints (Sec-CH-UA headers) where sites request only what they need. Feature detection has always been the better approach; UA parsing remains useful for analytics, log analysis and bot identification.

User-Agent Parser at a glance

Header
User-Agent, sent on every HTTP request
Mozilla/5.0
A legacy compatibility token, not a real claim
Successor
User-Agent Client Hints (Sec-CH-UA)
Trustworthy?
No — trivially spoofed by clients and bots

How to use the User-Agent Parser

  1. 1Paste the User-Agent string from a log line or your browser's network tab.
  2. 2Read the identified browser, version, engine and operating system.
  3. 3Treat the result as a hint — the header is self-reported and freely faked.

When you would reach for it

  • Analysing which browsers and versions appear in your access logs.
  • Identifying bot and crawler traffic by its declared agent.
  • Reproducing a bug reported by a user who pasted their UA string.

User-Agent Parser — frequently asked questions

Last reviewed · questions or corrections: contact@decoder.tools