top
logo
articleBlog
custom iconFeature overview
language-switch

How to Determine Browser Version and Operating System by Parsing User-Agent Strings

How to Determine Browser Version and Operating System by Parsing User-Agent StringsbonniedateTime2025-12-13 06:25
iconiconiconiconicon

To determine what browser and operating system a user is using, many times it starts with the User-Agent string.

Although the User-Agent may seem simple, it plays a very important role in browser fingerprinting. If it is parsed incorrectly, or does not match the real environment, it can easily be detected by fingerprinting tools.

Next, we will discuss how to determine the browser and operating system using the User-Agent, and how to correctly understand and use User-Agent parsing.

ScreenShot_2025-12-03_181122_605.webp

1. What is a User-Agent? What does it represent?

Simply put, a User-Agent is a "self-introduction" that the browser sends to the server when requesting a webpage.

For example, a common User-Agent string may look like this:

 
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36
(KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36

Through proper User-Agent parsing, we can basically determine:

•  Whether the user is using Windows or macOS

•  Whether the browser is Chrome, Edge, Firefox, or Safari

•  Whether it is a desktop or mobile device

2. Determining the Operating System viaUser-Agent Parsing Methods

In the User-Agent, the operating system is usually written in the first set of parentheses, for example:

  • Windows NT 10.0 → Windows 10
  • Windows NT 11.0 → Windows 11
  • Mac OS X 10_15_7 → macOS
  • Android 13 → Android
  • iPhone; CPU iPhone OS 17_0 → iOS

By identifying these fixed keywords, you can complete the basic operating system recognition.

Many browser fingerprinting systems essentially rely on these fields for the first layer of determination.

3. Determining Browser Type via User-Agent Parsing

When determining the browser, pay a little attention because many browsers now use "shells."

•  Chrome/ → Google Chrome or Chromium-based browser

•  Edg/ → Microsoft Edge

•  Firefox/ → Firefox browser

•  Safari/ (without Chrome) → Apple Safari

•  OPR/ → Opera browser

For example:

 
Chrome/120.0.0.0 Edg/120.0.0.0

4. The Role of User-Agent Parsing in Browser Fingerprinting

In browser fingerprinting, the User-Agent provides "explicit information," while other parameters are more like "hidden features."

Some professional fingerprinting platforms (such as ToDetect) focus on analyzing:

•  Whether the User-Agent is unusual

•  Whether it matches system parameters

•  Whether there are signs of spoofing or modification

5. Can User-Agent be Spoofed? Is it Reliable?

The User-Agent can be modified, but modifying it alone is of limited use. If you only change the User-Agent without also modifying:

•  System platform

•  Browser features

•  WebGL information

Then in front of fingerprinting tools like ToDetect, you are basically "exposed." Therefore, in real-world use, the User-Agent is mostly for:

•  Preliminary determination

•  Quick filtering

•  Used in combination with fingerprint analysis

It is not the sole basis.

Summary: How to Properly ViewUser-Agent Parsing

The User-Agent is basic information for determining the browser and operating system, and in browser fingerprinting, it is only one part of the process.

Tools like ToDetect pay more attention to overall consistency rather than a single field.

However, when it comes to risk control, account environments, or anti-detection, it is necessary to consider the complete browser fingerprinting system.

How to Determine Browser Version and Operating System by Parsing User-Agent Strings—ToDetect