A complete guide to how the User-Agent Parser decodes browser, OS, and device information, why parsing order matters, and how bot detection works.
Launch the User-Agent Parser →The User-Agent Parser takes a browser User-Agent string — the identifying text every browser sends with each web request, describing itself to the server it's talking to — and breaks it down into readable fields: browser name and version, rendering engine, operating system and version, device type (desktop, mobile, or tablet), CPU architecture, and whether the string appears to belong to an automated bot or crawler rather than a human-operated browser.
A convenient "Use My Browser's User-Agent" button automatically fills in and parses the User-Agent string of whatever browser you're currently using to view the page, which is useful both as a quick demonstration of the tool and as a genuinely practical way to see exactly what your own browser is reporting about itself to every website you visit.
Every time a browser makes an HTTP request — loading a webpage, fetching an image, submitting a form — it includes a User-Agent header containing a text string that identifies the browser, its version, the operating system it's running on, and sometimes the device type. This has been a standard part of the HTTP protocol since the earliest days of the web, originally intended to let servers tailor content appropriately for different browsers' varying capabilities.
A real User-Agent string looks something like Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36. Despite how it looks, this specific example is actually from Google Chrome, not Firefox or Safari — the string contains "Mozilla," "AppleWebKit," and "Safari" for deep historical compatibility reasons dating back decades, where each new browser included references to older, more widely-recognized browser names so that websites built to check for those older names would still correctly serve them modern, compatible content. This historical quirk is exactly why parsing a User-Agent string correctly requires careful, ordered pattern matching rather than a naive search for the first familiar-looking browser name encountered.
Because of the historical naming overlap described above, this tool checks for browser identifiers in a specific, deliberate order, checking for the most specific and most likely-to-be-definitive markers first, before falling back to more generic ones. Microsoft Edge, Opera, Samsung Internet, Vivaldi, and Brave are all checked before Chrome, because every one of those browsers is itself built on the same underlying Chromium engine as Chrome and includes the string "Chrome" somewhere in their own User-Agent string for compatibility reasons — checking for Chrome first would incorrectly misidentify an Edge or Opera browser as plain Chrome.
Similarly, Firefox is checked using its own unique "Firefox/" marker, and Safari is identified specifically by the presence of "Version/" combined with "Safari" (since the word "Safari" alone also appears in the User-Agent strings of Chrome and other WebKit/Blink-based browsers running on Apple platforms, for the same historical compatibility reasons).
Operating system detection follows a similar careful-ordering principle: iOS and iPadOS are checked using their own specific markers ("iPhone OS" and "CPU OS" respectively) before falling through to generic Mac OS X detection, since an iPhone's User-Agent string technically also contains "like Mac OS X" as part of its own compatibility-oriented string construction.
Before this tool was shipped, its parsing logic was explicitly tested against eight real-world User-Agent strings covering Chrome, Edge, Safari, Firefox on desktop, Safari on iPhone, Chrome on Android, Safari on iPad, and a known bot (Googlebot), confirming each one was correctly identified before the tool was considered reliable enough to publish.
Separately from the main browser/OS/device parsing, the tool runs a dedicated check for common keywords and known bot names — "bot," "crawl," "spider," and specific names like Googlebot, Bingpreview, and various SEO crawler tools — anywhere in the User-Agent string. This check runs independently of the main parsing logic specifically because legitimate bots often have User-Agent strings that don't match any normal browser pattern at all, as seen in the Googlebot test case, which correctly shows "Unknown" for browser, OS, and device fields while still being correctly flagged as a bot by this separate check.
It's worth being direct about a real limitation here: this is a best-effort pattern match against a list of known bot signatures, not a definitive security control. Any client, automated or human-operated, can set its own User-Agent string to anything at all, including deliberately impersonating a normal browser to avoid being flagged, or impersonating a known bot for testing purposes. This tool is useful for quick identification and curiosity, not as a security or access-control mechanism.
Beyond simple curiosity about one's own browser, parsing User-Agent strings serves several genuinely practical purposes across web development, system administration, and security work:
None of these use cases require treating the User-Agent string as a security guarantee — as noted elsewhere on this page, it is self-reported and can be spoofed — but as a fast, informative signal for everyday development, support, and traffic-analysis work, it remains genuinely useful precisely because the overwhelming majority of real traffic reports accurate, unmodified information.
Pasting a Googlebot User-Agent string (Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)) correctly returns "Unknown" for Browser, OS, and Device, since Googlebot does not follow normal browser conventions, but correctly flags "Is Bot/Crawler: Yes," demonstrating how the two detection systems work independently and both contribute useful information even when one of them can't return a confident answer.
All parsing happens entirely within your browser using JavaScript pattern matching against the text you provide or your own browser's self-reported User-Agent string. No network request of any kind is made by this tool, and nothing you paste or parse is transmitted anywhere, logged, or stored.
Rather than guessing when a string doesn't clearly match any known pattern, the tool deliberately shows "Unknown" to avoid presenting an incorrect result with false confidence. This happens most often with unusual, custom, or deliberately obscured User-Agent strings, and with legitimate automated tools and bots that don't follow normal browser conventions.
Not with certainty. Any browser or script can set its User-Agent header to any value it chooses, so while most normal, unmodified browsers report accurate information, the header is fundamentally self-reported and not independently verified by anything in the HTTP protocol itself.
This is a long-standing historical artifact of web compatibility. Modern browsers include references to older browser names and engines (like "Mozilla," "AppleWebKit," and "Safari") so that older websites checking for those specific names continue to correctly serve them compatible content, even though the actual browser in use may be completely different.
It covers the most common and widely used browsers, operating systems, and device categories, verified against real-world examples before being published, but highly unusual, very old, or deliberately customized User-Agent strings may not be fully recognized by its pattern set.