How to Parse a User-Agent String
Paste a non-empty User-Agent string into the parser and submit it to receive supported browser, operating-system, engine, and device classifications. An empty submission follows an error path instead of producing a parsed classification.
Before you begin
A User-Agent string is a line of text supplied by a browser, app, crawler, or another HTTP client. Several parts of that line can describe the browser, browser version, operating system, rendering engine, and device, but reading the tokens manually can be difficult.
Use the User Agent Parser when you have a value to inspect and want its supported signals separated into classifications. The tool compares the supplied text with matching patterns. Recognizable Chrome and Firefox text can receive the corresponding browser classification, while supported operating-system, engine, and device patterns can add further details.
Keep the original value unchanged while preparing it. Punctuation, slashes, parentheses, spacing, and version text can affect which patterns match. If the source displays a label such as User-Agent:, decide whether that label belongs to the value before pasting it. A complete copied line gives the matching rules more text to examine.
The result is useful for checking a request detail, comparing a returned classification with its source text, or recording how a supported pattern was interpreted. Treat each displayed value as a classification of the submitted text
Run a classification
-
Locate the source value. Copy the complete User-Agent text from the request, diagnostic view, log entry, or other place where it appears. Preserve its original characters rather than shortening the line.
-
Open the User Agent Parser. Find the control provided for entering a User-Agent value.
-
Paste the text. Insert the copied value into the input. The field is optional, but a non-empty value is needed before classification can be attempted. Do not add a field name unless it belongs to the value you are examining.
-
Submit the value. Use the available control to run the parser after checking that the intended text is present.
-
Review the returned categories. Examine the browser, browser version, operating system, operating-system version, rendering engine, and device classifications together. The result can also include mobile and bot indicators when their conditions are met.
-
Compare source and result. Keep the original string beside the returned classifications when documenting a request or investigating an unexpected value. This makes it easier to connect a displayed classification with the tokens that were submitted.
-
**Handle an empty-
Understand the classifications
input response separately.** If no User-Agent value is supplied, the tool reports an error indication and includes an example User-Agent instead of classifying an empty value. Paste the actual non-empty text and submit it again when you need a classification.
A recognizable Chrome string can produce Chrome, and a recognizable Firefox string can produce Firefox, with matching dotted version text extracted when present. Browser checks have a defined order: Chrome requires Chrome/ and excludes Chromium, Edg/, and OPR/; Firefox requires Firefox/ and excludes Seamonkey. Safari is checked without Chrome, while later checks recognize Edg/, OPR/, or Opera text. Overlapping tokens therefore follow those checks rather than a general interpretation.
Supported operating-system results include Windows, macOS, Android, iOS, and Linux. Some operating-system version formats are normalized when a matching version is present. AppleWebKit text can produce WebKit, and Gecko text can produce Gecko when the corresponding version pattern matches.
Device assignment starts with Desktop. Android or iPhone text can preassign Mobile, and iPad text can preassign Tablet. Later checks can set **
Worked example
A support analyst has a Chrome request value from a Windows desktop session and wants to separate its browser, operating system, engine, and device signals.
Copy a descriptive Chrome User-Agent placeholder representing Windows desktop text, paste it into the User-Agent input, and submit it once for the returned classifications.
The result contains browser, dotted browser version when present, operating system, engine, and device fields. For the supplied recognizable Chrome text, the browser classification is Chrome; the other values follow the matching tokens.
Limitations
- A non-empty value can produce Unknown when no supported pattern supplies a browser, version, operating-system, or engine result, while overlapping browser text follows the defined check order.
Common errors
- Cause: The value was left empty or was not submitted. Fix: Paste the complete non-empty User-Agent text and run the parser again; an empty submission returns an error indication and an example instead of classifications.
FAQ
Can I submit an empty User-Agent value?
The field may be left empty, but that input does not produce a classification. The tool reports an error indication and includes an example User-Agent, so enter a real non-empty value for analysis.
Which browser details can it identify?
A recognizable Chrome or Firefox pattern can produce the matching browser name and dotted version text when available. Other browser outcomes depend on the ordered checks and submitted tokens.
How are mobile and bot indicators determined?
The final device value controls these indicators: Mobile makes the mobile indicator true, while Bot/Crawler makes the bot indicator true. Later device checks can override an earlier operating-system-based value.