TToolbox
🖥️

User-Agent Parser

Detect browser, OS and device

About this tool

User-Agent (RFC 7231) is the HTTP request header transmitted by web clients to identify themselves to web servers. It encodes vital client properties: browser engine and version, operating system architecture, mobile device model, and web crawler bot identities. Auditing User-Agents is critical for responsive design testing, device analytics, and bot mitigation. This tool provides instant local User-Agent parsing and device telemetry decoding.

How to Use This Tool (Step-by-Step)

1

Inspect Current or Paste UA

The tool automatically detects your current browser's UA string upon landing, or you can paste any arbitrary server log UA string.

2

Analyze Hardware & Environment

The parser disassembles the string, mapping browser name/version, layout engine, operating system release, and device category.

3

Copy Structured Telemetry

Review indicators in a responsive summary card and copy the structured JSON object directly for telemetry pipelines.

Web Crawler & Bot Detection

Accurately detects search engine crawlers (Googlebot, Bingbot, Baiduspider) and automated Lighthouse audit bots for SEO debugging.

Mobile Device Model Identification

Identifies mobile devices (iPhone, iPad, Samsung, Huawei, Xiaomi) to assist mobile QA engineers in debugging vendor-specific quirks.

100% Client-Side Air-Gapped

Pattern evaluation runs strictly inside your local browser memory. User access logs and client identifiers are never sent to external servers.

User-Agent History & Best Practices

  • •Why every browser claims to be Mozilla: In the 90s, servers served rich pages only to Netscape (Mozilla). Competitors added 'Mozilla' tokens to avoid degraded layouts.
  • •Prefer Feature Detection over UA sniffing: User-Agents are easily spoofed by extensions and proxies. Always test for API support (`if (window.fetch)`) rather than sniffing.
  • •Chrome User-Agent Reduction: Major browsers are freezing minor version numbers in UA strings to curb fingerprinting. Rely on Client Hints for deep analytics.

Code & Transformation Examples

Modern Desktop Browser UA Decomposition Benchmark

Raw Chrome Desktop UA
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/125.0.0.0 Safari/537.36
Structured Parsing Breakdown
• Browser (浏览器) : Chrome 125.0.0.0
• Engine  (排版引擎) : Blink / WebKit 537.36
• OS      (操作系统) : Windows 10 / 11 (64-bit)
• Device  (设备类型) : Desktop (桌面电脑)
• Is Bot? (是否爬虫) : 否 (False)

* Historical browser wars force modern browsers to include legacy 'Mozilla/5.0' and 'Safari' tokens for compatibility.

JavaScript UA Detection Snippet

Traditional Navigator UA
const ua = navigator.userAgent;
const isMobile = /Android|iPhone|iPad/i.test(ua);
console.log("当前 UA:", ua);
Modern Client Hints API
if (navigator.userAgentData) {
  navigator.userAgentData.getHighEntropyValues(['platformVersion', 'model'])
    .then(ua => console.log("精准系统版本与机型:", ua));
}

* Modern browsers are transitioning toward Client Hints to protect privacy while offering structured device signals.

Frequently Asked Questions

Q: Can User-Agent headers be forged or spoofed?

A: Easily. DevTools and HTTP libraries like curl permit spoofing UA strings freely. Never rely on User-Agents for critical security authorization.

Q: How do I verify if a Googlebot request is genuine?

A: Run a reverse DNS lookup on the client IP address. Genuine bots resolve to hostnames ending in `.googlebot.com`, confirmed by forward DNS resolution.

Q: How do I identify WeChat's built-in in-app browser?

A: WeChat appends `MicroMessenger/x.x` and `NetType/WIFI` tokens to its UA string. Testing for `/MicroMessenger/i` accurately isolates WeChat traffic.

Related Tools

All processing happens locally in your browser. Your data is never uploaded to a server.
/