Dev tools

User-agent parser

Extract browser, OS, rendering engine, and device type from a User-Agent string via pattern matching, not backed by a maintained real-world UA database, so rare or new strings might parse partially. Runs on your device.

Runs on your device. The file is never uploaded.

User-agent parser reads a User-Agent string and prints browser, browserVersion, os, engine and deviceType as JSON with an isBot flag. Patterns are tried in a fixed order, Edg before OPR before Firefox before Chrome, so Edge never reports as Chrome. An unmatched field comes back null rather than a guess, since no maintained device database sits behind it.

Options

Questions

What does it extract?

Six fields, printed as JSON: browser, browserVersion, os, engine, deviceType and isBot. Anything it does not recognize comes back as null rather than as a guess, so a null means the pattern did not match, not that the string lacked the information.

How does it decide which browser it is?

By pattern, in a fixed order that matters. Edg is checked first, then OPR, Firefox, CriOS, Chrome, then Safari, then Internet Explorer. That order exists because every Chromium browser carries Chrome in its string and Safari carries it too. Edge is reported as Edge, not Chrome, precisely because Edg is tested first.

How does it decide mobile, tablet or desktop?

From two patterns and a fallback. Anything matching Mobi, or Android together with Mobile, is mobile. Anything matching Tablet or iPad is tablet. Everything else is called desktop, including strings it did not recognize at all. Recent iPads that present themselves as desktop Safari are therefore labeled desktop, which is what their string says.

How reliable is this?

It is regex and table based, with no maintained device database behind it. Vendors change their strings often, so a new or obscure agent can come back with nulls instead of matches. It errs toward reporting nothing rather than naming the wrong browser. For analytics at scale, a maintained database is the right tool.

How does the bot check work?

One case-insensitive pattern across the whole string, looking for bot, crawl, spider, slurp or bingpreview. That catches Googlebot, bingbot and most crawlers that identify themselves, and it misses anything disguised as a normal browser. isBot true is a useful signal; isBot false proves nothing.

Does my user-agent string get uploaded?

No. It stays in this tab and is matched against the patterns inside a Web Worker. That matters because a UA string pulled from a log can identify a specific device build, and this tool never transmits it anywhere or keeps it after the run.

Related Dev tools