User Agent Parser
Break a User-Agent string into browser, engine, operating system and device type, and detect obvious bots and automation clients.
Result
Details
- Raw string
- Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36
- Length
- 111 characters
- Contains "like Gecko"
- yes - historical compatibility token
About User Agent Parser
The User-Agent header is a historical accident that every browser now pretends to be several others within. Parsing it is still occasionally necessary for log analysis - this breaks one apart and flags the automation clients.
What replaced sniffing
Feature detection is the correct answer for compatibility: test for the API you need rather than inferring it from a version number. Where the server genuinely needs client information, User-Agent Client Hints provide it in structured, explicitly requested headers (Sec-CH-UA, Sec-CH-UA-Platform, Sec-CH-UA-Mobile), with high-entropy values available only on request. That model is auditable, which passive string parsing never was.
Why every string says Mozilla
Netscape sent Mozilla/5.0; sites checked for it; every subsequent browser had to claim it to avoid being served a degraded page. Chrome adds Safari and AppleWebKit for the same reason, and Edge adds Chrome. The result is that the only reliable signal is the most specific token, which is why detection order matters - check for Edg before Chrome, and Chrome before Safari.
Common use cases
- Working out what a client in an access log actually was.
- Identifying bot traffic during a traffic investigation.
- Checking your own browser string when debugging a compatibility report.
Edge cases and gotchas
- Never gate access on User-Agent - it is a hint, not an identity.
- Chrome and Safari have frozen or reduced their strings; version detail is increasingly unreliable.