What Is a User-Agent String?
Learn what HTTP User-Agent strings contain, why they matter for debugging, and how to parse browser, OS, and device details.
The basics
A User-Agent (UA) string is an HTTP header that clients send to identify themselves. Browsers include hints about the browser product, version, operating system, and sometimes device or layout engine.
Servers, analytics, and security tools may use UA strings for compatibility choices, bot detection, or troubleshooting — but they are not a perfect identity signal and can be spoofed.
What you can usually learn
A parser can often extract browser family and version, OS name, device class (desktop, mobile, tablet), rendering engine, and whether the string resembles a known bot or crawler.
Treat results as best-effort. Newer browsers intentionally reduce UA detail for privacy, and custom clients may send incomplete or unusual strings.
When parsing helps
Parsing is useful when debugging client-specific bugs, reading access logs, validating bot traffic during development, or explaining why a feature behaves differently on a particular browser/OS combination.