Saved

Press the star next to a tool's name to save it.

All my tools

User-Agent Parser

Use this user-agent parser to split a User-Agent string into the browser, version, rendering engine, operating system and device. Your own browser’s string is filled in for you.

Your own browser’s string is filled in for you. Paste any other User-Agent string and press Parse to see the browser, version, engine, operating system and device.

The string is read in your browser. Nothing is uploaded or stored.

What the string says

Paste a User-Agent string and press Parse.

A user-agent parser reads the long User-Agent string that a browser sends with every request and splits it into the parts people care about: the browser and its version, the rendering engine, the operating system and the kind of device. Your own browser’s string is filled in when the page opens, so you can see right away what a website sees. Paste any other string, from a server log or a support ticket, and press Parse.

The parsing is done by UAParser.js, an open-source library released under the MIT license [1], which runs inside this page. Nothing is uploaded, so the strings from your logs stay on your device.

How to use the user-agent parser

  1. Open the page: your browser’s own User-Agent string is already in the box.
  2. To check another visitor, paste their User-Agent string over it. In server logs it is the last quoted field of a typical access log line.
  3. Press Parse.
  4. Read the table: browser, version, engine, operating system, device type, vendor, model and CPU architecture.
  5. Press Use my browser’s string to go back to your own, or Clear to start empty.

What the result fields mean

FieldWhat it tells youExample
Browser and versionThe program making the requestChrome 120.0.0.0
Rendering engineThe layout engine inside the browserBlink, WebKit, Gecko
Operating systemThe system the browser runs onWindows 10, iOS 17.1
Device typemobile, tablet, console, smart TV, wearable or embedded; blank for most desktopsmobile
Device vendor and modelShown when the string names themApple, iPhone
CPU architectureShown only when the string includes itamd64, arm64

The library reports the device type as one of console, mobile, tablet, smart TV, wearable or embedded, and it has no value for a desktop [1]. That is why this page says “Desktop or not stated” when the type is empty: the string simply gives no device type.

Why User-Agent strings look so strange

Almost every string starts with Mozilla/5.0, and Chrome strings also mention Safari, AppleWebKit and Gecko. This is history: browsers copied tokens from one another so that websites written for older browsers would still work. The result is a string that names several browsers at once, which is why a parser, rather than a simple search for a word, is needed. For example a Chrome string contains the word Safari, and an iPhone Chrome string contains Safari and Mobile as well.

Worked example: reading a mobile string

Paste this string: Mozilla/5.0 (iPhone; CPU iPhone OS 17_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.1 Mobile/15E148 Safari/604.1. The parser reports Mobile Safari 17.1 as the browser, WebKit 605.1.15 as the engine, iOS 17.1 as the operating system, Apple as the vendor and mobile as the device type. Notice that the string says Mac OS X inside the brackets; the parser still recognizes it as an iPhone, because it looks at the whole string, not at single words.

User-Agent Client Hints

The User-Agent header carries a lot of information that is rarely needed, and some of it can help identify a particular person. User-Agent Client Hints are a newer way to share the same details: low-entropy values such as the browser brand, platform and a mobile flag are sent by default, while details such as the device model are sent only when the server asks for them [2]. Browsers are working towards a smaller User-Agent string, so strings may carry less detail over time and a parser can only report what the string contains.

Limits and good habits

  • A User-Agent string can be changed by the user, a browser extension or a bot, so treat it as a hint, not proof.
  • Detecting features in code, such as asking whether an API exists, is more reliable than checking the browser name.
  • Bots often write their own name in the string, which makes logs easier to filter.
  • A blank or very short string usually comes from a script or a tool, not from a browser.
  • Do not block visitors only because the parser failed to recognize a new browser.

Where to find User-Agent strings

In server logs, the User-Agent is the last quoted field of a line in the common combined log format. In a browser’s developer tools, open the network panel, click a request and look in the request headers for User-Agent. In JavaScript, the string is available as navigator.userAgent, which is exactly what this page reads when it opens. Support teams often ask users to visit a page like this one and send the result, which is quicker than asking for the browser name and version by hand.

Analytics tools, crawlers and monitoring services also send their own strings. Many name themselves clearly, for example with the word bot or spider and a link to a page that explains the crawler. Parsing the string is a first step; to confirm that a visitor really is a search engine crawler, check the address it comes from, because the string alone can be copied by anyone.

Common mistakes

  • Copying the whole log line instead of only the User-Agent field.
  • Expecting a device model on a desktop browser, which normally does not name one.
  • Assuming the engine name is the browser name: Chrome, Edge and Opera all use Blink.

What next

Use this often? Add User-Agent P to your Home screen.

Frequently asked questions

What does a user-agent parser do?

It reads the User-Agent string a browser sends and reports the browser, version, rendering engine, operating system and device it describes.

How do I see my own User-Agent string?

Open this page. Your browser’s string is filled in automatically, and the table below shows how it is read.

Why does the device type say desktop or not stated?

The parsing library has no device type for desktops. When the string gives no type, the field is empty, and this page labels it that way.

Can a User-Agent string be faked?

Yes. Users, extensions and bots can change it, so treat the result as a hint and not as proof of who is visiting.

Is the string uploaded anywhere?

No. The parsing library runs in your browser and nothing is sent to a server.

What went wrong?

We only receive the reason you pick, never what you typed into the tool.

Thanks for your feedback.

More Developer Tools