User Agent Parser

Parse user-agent strings into browser, OS, device details, and device type classification

POST 1 credit /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
Response 200 OK
{
  "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

Live Demo

Description

Parse user-agent strings into browser, OS, device details, and device type classification

How to Use

1

1. Send a POST request with a JSON body containing the `ua` field.

2

2. Inspect the `browser`, `os`, and `device` objects for parsed details.

3

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

Frequently Asked Questions

What user-agent database is used?
The `ua-parser` / `python-user-agents` library, which is based on the ua-parser project and covers thousands of browsers, bots, and devices.
Can it detect specific bot names?
Yes. The `device.family` field will contain the bot name (e.g. "Googlebot", "bingbot") when a known crawler is detected.
What if the user-agent string is unrecognized?
Fields will return generic values like `"Other"` for the family and empty strings for versions. The `device_type` will be `"other"`.

Start using User Agent Parser now

Get your free API key and make your first request in under a minute.