Skip to main content
Develop Tools
← Return to usage guide

How to Analyze a User-Agent and Identify the Browser, OS, and Device

Even if a long User-Agent remains in an access log, you cannot correctly identify the browser merely by reading it from left to right. Compare the actual string, breakdown result, and Tool result.

Diagram for reading a User-Agent by separating compatibility identifiers, OS, engine, and browser-related tokens
Diagram for reading a User-Agent by separating compatibility identifiers, OS, engine, and browser-related tokens

Conclusion: Check the combination of identifiers and the order of judgment

This can be read as Chrome for the browser, macOS for the OS, Desktop for the device, and Blink for the engine. However, Safari tokens are included for compatibility purposes, so do not identify this example as Safari. A UA narrows environment candidates; it is not device identity information.

User-Agent example used for analysis

User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/143.0.0.0 Safari/537.36
ItemResultHow to read
BrowserChrome 143.0.0.0Uses Chrome/143.0.0.0
OSmacOS 10.15.7Check Macintosh and Mac OS X
DevicedesktopNo mobile or tablet identifiers
EngineBlinkEstimated from the Chrome product token

Decompose and read the User-Agent string

User-Agent is not in a format where you can just choose one product name from the left. To maintain compatibility, multiple names such as Mozilla, AppleWebKit, Chrome, and Safari are listed, and the product-specific token at the end may be important for determination.

IdentifiersWhat you can see from this examplePoints to note
Mozilla/5.0Leading token that indicates compatibilityDoes not mean Firefox support is confirmed
Macintosh / Mac OS XOS candidates and displayed versionActual OS information may be simplified
AppleWebKit/537.36Engine compatibility tokenDo not conclude that this word alone means Safari
Chrome/143.0.0.0Browser candidates and versions shown in the UADetailed information may be fixed or reduced by UA Reduction
Safari/537.36Token for compatibility purposesAlso included in the Chrome UA

Just one word, such as the word Safari or the word beginning with Mozilla, does not determine the browser. Check the identifiers in order of uniqueness.

Difference between HTTP headers and navigator.userAgent

For server logs, check the User-Agent header of the HTTP request. In browser JavaScript, you can obtain the string exposed by the current browser through navigator.userAgent. The contents are usually similar, but consider the transmission path, browser settings, proxies, and application overrides.

const ua = navigator.userAgent;
console.log(ua);

Range that can be confirmed with the User-Agent analysis tool

classificationFeatures
InputPaste UA string, current browser UA, representative sample
Main resultsBrowser and version, OS, device type, engine, CPU architecture, display context
Auxiliary judgmentMobile, bot-like identifiers, Android/iOS WebView, typical in-app browsers
Client HintsObtain and analyze in a compatible environment only when loading the current browser UA
something that cannot be determinedThe owner of the actual device, the exact model, the authenticity of the bot claiming to be UA, and any proprietary clients.

Analysis results include sources, confidence, and supporting evidence. Values that cannot be inferred remain "unknown" or "undetermined" rather than being filled with another OS or device name. Client Hints do not apply to a pasted third-party User-Agent.

  • Paste the entire UA without omissions
  • Check browser, OS, device, engine, and evidence separately.
  • Leave unknown and estimated values as-is in investigation notes for logs.

Points to note when using judgment results for implementation/operation

  • Do not determine it from a one-word partial match such as Safari, Chrome, or Mozilla.
  • Do not assume that the OS version or device model can always be obtained.
  • Prioritize Feature Detection when checking Web API support

User-Agent is an HTTP header that can be changed using curl, developer tools, app settings, etc. Do not use UA alone to determine authentication, authorization, identity verification, and management screen permissions by using this information as auxiliary information for log analysis or narrowing down the conditions for reproducing the problem.

Do not collect more Client Hints or device information than necessary. We will set the purpose and consider privacy, including storage period and access privileges.

Official information confirmed in this article

Browser and crawler identifiers may change. Based on the official materials at the time of article creation, older version examples are not treated as the latest version numbers, but are posted as representative examples to check the token structure.

MaterialsWhat was confirmed
MDN Navigator.userAgentThe UA string can be changed, and there are limits to the reliability of browser judgment.
MDN UA sniffingPrioritize Feature Detection over User-Agent determination when determining feature compatibility.
Chrome for DevelopersPurpose, acquisition method, and privacy precautions of UA Reduction and User-Agent Client Hints
Google Search Central / Bing Webmaster ToolsDistinguish between UA that includes the crawler name and authenticity confirmation using IP, reverse lookup, etc.
OpenAI official crawler materialsUsage and public UA examples of OAI-SearchBot, GPTBot, and ChatGPT-User

Example: Read Chrome-family UAs in access logs

Copy only the User-Agent header value from the log and paste it into the analysis tool. Check not only the resulting values but also that Chrome, Mac OS X, and AppleWebKit are used as evidence.

If notation shared across multiple OS generations appears, such as Windows NT 10.0, do not infer the OS generation; record it as a Windows 10 / 11 candidate.

  1. Extract only the UA portion from logs
  2. Paste it into the tool to analyze it
  3. Compare primary results and supporting tokens
  4. Record items that cannot be confirmed as estimates

Do not paste IP addresses, cookies, or authentication information from logs together with the User-Agent.

Frequently asked questions

If it says Safari, is it Safari?
No. Chrome-based UAs also contain a Safari token. Check highly distinctive identifiers and their order, such as Chrome, Edg, and Version.
Can User-Agent reveal a device model?
A model in the string can provide a clue, but it may be omitted due to UA Reduction or browser settings, so it is not information that can always be obtained.

Try It in Your Browser

Your input is processed entirely in your browser. Keep the original data, review the output, and only then save or share it.

Parse User-Agent