Guide
What Is a User-Agent?
A user-agent string is request metadata that describes the software making an HTTP request.
What it can contain
User-agent strings often include browser family, browser version, rendering engine, operating system, device type, app name, or bot name.
They are useful for debugging compatibility, rough analytics, and identifying obvious crawlers.
Why it is imperfect
User-agent strings are sent by the client and can be spoofed, shortened, frozen, or intentionally generic.
Treat parsed user-agent data as a hint. It is not a secure identity signal and should not be used as the only fraud or access-control signal.
Key terms
- Browser
- Application family such as Chrome, Safari, or Firefox
- Engine
- Rendering engine such as WebKit, Blink, or Gecko
- Bot
- Crawler or automated client signal when detectable
Examples
Browser string
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 Chrome/148.0.0.0 Safari/537.36
A browser-style user-agent string with platform and engine hints.
Parse this browser string
Bot token
Googlebot/2.1
Example of a crawler-identifying token.
Parse this bot token
Related guides and tools
FAQ
Can a user-agent be fake?
Yes. Clients control the user-agent string, so it can be changed or spoofed.
Why do many user agents start with Mozilla?
It is a long-lived compatibility convention. Many modern browsers include Mozilla/5.0 even though they are not the old Mozilla browser.