User Agent Parser
Parse user-agent strings into browser, OS, device details, and device type classification
/v1/user-agent
curl -X POST "https://devtools.toolkitapi.io/v1/user-agent" \
-H "Content-Type: application/json" \
-d '{"ua": "Mozilla/5.0 (iPhone; CPU iPhone OS 17_0 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.0 Mobile/15E148 Safari/604.1"}'
import httpx
resp = httpx.post(
"https://devtools.toolkitapi.io/v1/user-agent",
json={"ua": "Mozilla/5.0 (iPhone; CPU iPhone OS 17_0 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.0 Mobile/15E148 Safari/604.1"},
)
print(resp.json())
const resp = await fetch("https://devtools.toolkitapi.io/v1/user-agent", {
method: "POST",
headers: {
"Content-Type": "application/json",
},
body: JSON.stringify({"ua": "Mozilla/5.0 (iPhone; CPU iPhone OS 17_0 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.0 Mobile/15E148 Safari/604.1"}),
});
const data = await resp.json();
console.log(data);
# See curl example
{
"browser": {"family": "Mobile Safari", "version": "17.0"},
"os": {"family": "iOS", "version": "17.0"},
"device": {"family": "iPhone", "brand": "Apple", "model": "iPhone"},
"is_mobile": true,
"is_tablet": false,
"is_pc": false,
"is_bot": false,
"device_type": "mobile"
}
Try It Live
Description
How to Use
1. Send a POST request with a JSON body containing the `ua` field.
2. Inspect the `browser`, `os`, and `device` objects for parsed details.
3. Use the boolean flags (`is_mobile`, `is_tablet`, `is_pc`, `is_bot`) or the `device_type` string for classification logic.
About This Tool
User Agent Parser breaks down a user-agent string into structured data — browser family and version, operating system, device information, and a high-level device type classification (mobile, tablet, desktop, bot, or other).
It uses the `ua-parser` library which maintains patterns for thousands of browsers, bots, and devices, so even unusual or legacy user-agent strings are parsed accurately.
Why Use This Tool
- Analytics enrichment — Parse raw user-agent logs into structured browser/OS/device columns
- Bot detection — Identify crawlers and automated clients via the `is_bot` flag
- Responsive testing — Verify which device type a user-agent resolves to
- Access control — Block or allow traffic based on parsed browser or OS family
Frequently Asked Questions
What user-agent database is used?
Can it detect specific bot names?
What if the user-agent string is unrecognized?
Start using User Agent Parser now
Get your free API key and make your first request in under a minute.