/ua User-Agent Parser

Break a User-Agent string down into browser, operating system, rendering engine and device class. Parses whatever UA you send — pass one with -A to decode an arbitrary string.

GET plain HTTP ok no signupnothing stored
curl -A "$UA" curlhub.sh/ua

Usage

With curl

curl curlhub.sh/ua
curl -A "Mozilla/5.0 (iPhone; CPU iPhone OS 17_0 like Mac OS X)..." curlhub.sh/ua

With the CLI

curlhub ua

Structured output for scripts

curl -s curlhub.sh/ua -H 'Accept: application/json'

Output

Parameters

InputWhat it does
-A "string"Set the User-Agent to parse an arbitrary string, not just your own.
Accept: application/jsonReturn {browser, os, engine, device} as JSON.

Recipes

Decode a UA from a log line

curl -A "$(grep -oP '"\K[^"]+(?=" *$)' access.log | tail -1)" curlhub.sh/ua

Check how a bot identifies

curl -A "Googlebot/2.1 (+http://www.google.com/bot.html)" curlhub.sh/ua