User Agent Parser
Parse user agent strings to detect browser, OS, and device type.
Last updated: August 2026
Was this tool helpful?
Reading a User-Agent string
The User-Agent header is a string browsers send that, in theory, identifies the browser, its version, the operating system, and the device. A parser extracts those fields. In practice the format is a historical mess, full of legacy tokens kept only for backward compatibility, which is why parsing it reliably is harder than it should be.
Why it is so cluttered
Nearly every browser still claims to be Mozilla/5.0 for compatibility reasons dating to the 1990s, and Chrome, Edge, and others include tokens like Safari and AppleWebKit so old server-side sniffing still serves them modern pages. The real identity is buried among the compatibility fluff.
Example
Mozilla/5.0 (Windows NT 10.0; Win64; x64)
AppleWebKit/537.36 (KHTML, like Gecko)
Chrome/120.0 Safari/537.36
Browser: Chrome 120
OS: Windows 10
Device: DesktopDo not over-trust it
A User-Agent is self-reported and trivially spoofed, so it is unreliable for security decisions. Browsers are also freezing and reducing it for privacy, moving detail into Client Hints instead. For feature decisions, detect the capability directly rather than inferring it from the string. Need realistic samples to test with? See the User-Agent generator.
FAQ
Why does Chrome's UA mention Safari? For legacy compatibility. Chrome includes Safari and AppleWebKit tokens so older sites treat it as a modern WebKit browser.
Can I trust the OS it reports? Only loosely. It can be spoofed, and reduced UA strings now report a coarse platform rather than a precise version.
How do I tell a bot from a browser? Many crawlers name themselves (Googlebot, bingbot), but malicious ones impersonate browsers, so the string alone is not proof.