Developer

User-Agent Parser

Inspect the browser and platform hints in a user-agent string.

Processed in your browser

Every time a browser asks a server for a page, it sends a short line of text that describes itself. That line is the user-agent string. The User-Agent Parser reads one of these strings and lists what it says: the browser and its version, the operating system, the type of device and the rendering engine.

When the page opens, the text box already holds the user-agent string of the browser you are using. You can replace it with any other string, for example one copied from a server log or sent in by a customer.

Parsing happens on your own device. The page carries the line "Processed in your browser", and the text in the box is not sent to the IP Tracker server.

How to use the parser

  1. Open the page. The large text box is filled with the user-agent string of your own browser.
  2. To check your own browser, leave the text as it is. To check another string, clear the box and paste that string in.
  3. Click Run tool.
  4. Read the rows of the result. Only the details that could be detected are listed.
  5. Use "View as JSON", Copy JSON or Download JSON to keep the result or attach it to a support ticket.

Paste the whole string. Parts that look like noise, such as (KHTML, like Gecko), help to tell one browser from another.

How to read the result

The example column below shows what the parser returns for this string, sent by Chrome on a Windows computer: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36.

RowWhat it meansExample
Browser nameThe program that sent the stringChrome
Browser versionThe version number the browser reports124.0.0.0
OS nameThe operating systemWindows
OS versionThe system version as it is written in the stringNT 10.0
OS version nameThe everyday name of that version, when one is known10
Platform typeThe kind of device, such as desktop, mobile or tabletdesktop
Engine nameThe part of the browser that draws web pagesBlink
Engine versionThe version of that engine, when the string gives oneNo row for this string

The result lists the details the parser finds. A browser string normally produces most of the rows. A string from a command-line program such as curl/8.5.0 names no browser, system or engine that the parser knows, so the result is nearly empty. Where a row has no value, it reads "Not available". Nothing is guessed.

What a user-agent string is and when it is sent

HTTP, the protocol browsers use to fetch pages, lets every request carry extra lines called headers. One of them is named User-Agent. "User agent" is the technical term for any program that acts on behalf of a person, and a browser is the most familiar kind.

The browser sends this header with every request it makes: for the page, and for each image, script and style sheet on it. Scripts running in the page can read the same text. Servers record it in their access logs, usually next to the address of the visitor and the page that was requested.

Browsers are not the only senders. Search engine crawlers, monitoring services, mobile apps and command-line tools each send their own string, and well-behaved ones use it to say who they are.

Websites use the string to choose a mobile or desktop layout, to work around a bug in one browser version, or to count which browsers their visitors use.

How to read a string yourself

A user-agent string is a row of tokens, most of them in the form Name/version, with comments in parentheses. Taking the Chrome example apart shows what each piece is for.

TokenWhat it says
Mozilla/5.0A compatibility marker with no meaning today. Nearly every browser sends it
(Windows NT 10.0; Win64; x64)The operating system and the processor type
AppleWebKit/537.36A claim to behave like the WebKit engine, kept for compatibility
(KHTML, like Gecko)A claim to behave like two older engines, also kept for compatibility
Chrome/124.0.0.0The real browser and its version
Safari/537.36A claim to behave like Safari, kept for compatibility

The borrowed names have a history. In the 1990s, servers looked for the word "Mozilla", the code name of the Netscape browser, before sending their more advanced pages. Other browsers added the word to their own strings so that they would receive the same pages. The pattern repeated with each new engine, and no browser could drop the old tokens without breaking sites that still checked for them. That is why a Chrome string mentions Mozilla, WebKit, Gecko and Safari.

A browser built on another one adds its own token and keeps the rest. Microsoft Edge sends the Chrome string with Edg/124.0.0.0 added at the end, and that one token is what identifies it. A parser has to test for the more specific names first, which is why reading these strings by eye goes wrong so often.

Firefox strings are shorter: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:125.0) Gecko/20100101 Firefox/125.0. The parser reads the browser as Firefox and the engine as Gecko. In this string the number after Gecko/ is a fixed date that stays the same from one version to the next, so it says nothing about how new the browser is.

Why the string is a hint and not proof

The browser decides what to send, and whoever controls it can change that. Developer tools in desktop browsers can send the string of a phone. Extensions can replace it. A script can send any text at all, and with curl the -A option sets it in one step. A request that claims to be Chrome on Windows may come from a program in a data center.

Automated traffic does this routinely. Scrapers copy the string of a popular browser so that they blend in, and some pretend to be a search engine crawler in the hope of being let through. A user-agent string alone never proves that a request came from a real crawler. The operators of the large crawlers publish ways to verify them, such as a reverse DNS check on the address, which you can run with Reverse DNS Lookup.

Browsers themselves now send less detail than they used to, which makes visitors harder to tell apart. Chrome and other browsers built on the same code report only the major version and fill the rest with zeros, as in 124.0.0.0. They report recent Windows releases as Windows NT 10.0, so Windows 10 and Windows 11 look the same. Safari and Chrome on a Mac report 10_15_7 whatever the real macOS version is, and the parser then names that version Catalina.

On an iPad, Safari asks for desktop sites by default and sends the string of a Mac, so a tablet can be reported as a desktop computer.

Chrome-based browsers offer the full details through a separate mechanism called User-Agent Client Hints, which a website has to request. This parser reads the user-agent string only.

Uses in support, log analysis and testing

Support staff ask for the user-agent string because customers often cannot say which browser version they have. Sending someone to this page and asking for the result gives the browser, the system and the device type in one step. It is a starting point for reproducing a problem, within the limits described above.

In log analysis the string helps to separate kinds of traffic. Checking a handful of strings from an access log shows which requests come from browsers, which from crawlers that name themselves, and which from scripts. A burst of requests with a very old browser version or an empty string is often automated. The address tells you more than the string does, and IP Lookup shows the network a request came from.

Developers use the parser for testing. After switching a browser to a device mode, or setting a custom string in an HTTP client, pasting the string here shows how a parser on a server is likely to read it. When a site serves the wrong layout to one device, the string of that device is the first thing to check.

For deciding what a browser can do, testing for the capability directly in a script is more dependable than reading a name and version out of the string.

The user-agent is a request header, sent from the browser to the server. To look at the headers a server sends back, use HTTP Headers.

What the parser does not show

It reads the text you give it and nothing else. It does not verify that the string is genuine, and it cannot detect a browser that reports a false one.

It does not show your IP address, your location, your screen size or your installed fonts. None of those are in the user-agent string. For your public address, use What Is My IP.

It does not read Client Hints, so details that a reduced string leaves out stay unknown. Strings from uncommon programs may produce few rows.

Frequently asked questions

What is my user agent?

Open this page and look at the text box. It is filled with the string your browser sends. Click Run tool to see it broken down into browser, system, device type and engine.

The string belongs to the browser, not to you or your device. Another browser on the same computer sends a different one.

Why does my user agent start with Mozilla/5.0 when I do not use a Mozilla browser?

It is a leftover from the early web. Sites once checked for the word Mozilla before sending their full pages, so every browser began to include it. Removing it now would break old sites that still look for it.

The token carries no information about your browser. The parts that identify it come later in the string.

Why does the Chrome user agent mention Safari?

Chrome started out using WebKit, the engine that Safari uses, and it copied the WebKit and Safari tokens so that sites written for Safari would treat it the same way. Chrome has had its own engine, Blink, for many years, but the tokens stayed.

Why does the result say Windows 10 when I have Windows 11?

Because the string says so. Browsers on Windows 11 still send Windows NT 10.0, the same text as on Windows 10, and the parser can only report what it is given.

The same thing happens on a Mac, where current browsers send an old, fixed macOS version number.

Can a website identify me from my user agent?

Not by itself. Everyone with the same browser version on the same system sends the same string.

It can be one ingredient in fingerprinting, where a site combines many small details about a browser to tell visitors apart. That is one reason browsers have reduced what the string reveals.

Can I change my user agent?

Yes. Desktop browsers have a setting for it in their developer tools, and there are extensions for the purpose. Changing it affects which version of a site you are served, and some sites stop working correctly when the string does not match the browser.

Is my user-agent string sent to IP Tracker?

The text in the box is parsed in your browser and is not submitted to the IP Tracker server.

Your browser does send its user-agent header to every website it loads pages from, and this one is no exception. That is part of HTTP and is separate from this tool.

Where do I find the user agent of a visitor to my site?

In the access log of your web server. Common log formats put the string at the end of each line, in quotes. Analytics tools show the same information already split into browser and system.