Segmenting analytics or server logs
Aggregate browser and OS distribution from access logs to decide which platforms your support matrix actually needs to cover.
Parses User-Agent HTTP header strings into browser name, version, rendering engine, operating system, and bot flags.
—Parses User-Agent HTTP header strings into browser name, version, rendering engine, operating system, and bot flags.
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
Browser: Mobile Safari 17.0 · OS: iOS 17.0 · Device: iPhone (Mobile) · Bot: false
Extracts granular hardware and software tokens.
A normalized description of client browser, operating system, and hardware.
Your input is processed entirely in your browser and never sent to a YAS server.
curl -X POST "https://yas.sh/api/v1/tools/user-agent-parser" \
-H "Content-Type: application/json" \
-d '{"userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36"}'const res = await fetch("https://yas.sh/api/v1/tools/user-agent-parser", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
"userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36"
}),
});
const data = await res.json();import requests
r = requests.post("https://yas.sh/api/v1/tools/user-agent-parser", json={"userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36"})
data = r.json()| Field | Type | Required | Description |
|---|---|---|---|
| userAgent | string | Yes | User-Agent string |
{ "slug": "user-agent-parser", "browser": { "name": "Chrome" }, "os": { "name": "macOS" } }Parse User-Agent string into browser, OS and device.
400 VALIDATION_ERROR — invalid input or unsupported option.413 PAYLOAD_TOO_LARGE — input exceeds the 64 KB limit.429 RATE_LIMIT_EXCEEDED — rate limit exceeded (60 req/min).A User-Agent string is parsed by matching it against an ordered set of patterns for browsers, rendering engines, operating systems and device families. Order matters enormously because the format is historically dishonest: Chrome's UA claims to be Mozilla, KHTML, Gecko and Safari all at once, a legacy of decades of servers gating features on substring checks. Edge must be matched before Chrome, and Chrome before Safari, or every result is wrong.
The platform is moving away from this string. Chrome has frozen and reduced UA detail, replacing it with User-Agent Client Hints — structured headers (Sec-CH-UA, Sec-CH-UA-Platform, Sec-CH-UA-Mobile) that a site must explicitly request. Parsing the legacy string still works for analytics and logs, but a modern Chrome UA deliberately reports a rounded version and a generic platform.
Aggregate browser and OS distribution from access logs to decide which platforms your support matrix actually needs to cover.
The UA from an error report identifies the exact browser and OS version, which is usually the fastest route to reproducing it.
Distinguishing search-engine crawlers from scrapers and from real users before analysing behaviour prevents badly skewed metrics.
When an API rejects requests from one client, comparing the parsed UA against a working one narrows the difference quickly.
What this tool deliberately does not do, and where it will disagree with other implementations.