User Agent 解析器
解析 User Agent 字符串以识别浏览器、操作系统、设备和引擎信息
粘贴 User Agent 字符串或使用您当前浏览器的...
使用方法
粘贴或输入内容
在输入区域输入您的文字、代码或数据。
选择选项
选取要应用的转换方式或格式。
复制结果
一键将输出结果复制到剪贴板。
为什么使用此工具
100% 免费
没有隐藏费用,没有付费等级——所有功能完全免费。
无需安装
完全在浏览器中运行。无需下载或安装任何软件。
隐私且安全
您的数据永远不会离开您的设备。不会上传至任何服务器。
支持移动设备
完全响应式设计——在手机、平板或桌面电脑上均可使用。
User Agent Strings: Browser and Device Identification
Key Takeaways
- User agent strings identify the browser, operating system, and device type — but their format is notoriously inconsistent and often misleading.
- User agent parsing is essential for analytics, content negotiation, and debugging browser-specific issues.
- All parsing happens in your browser — your user agent data is never sent to any external server.
Every HTTP request includes a User-Agent header that identifies the client software. What started as a simple browser identifier has evolved into a complex string carrying browser, engine, OS, and device information — with decades of legacy compatibility quirks. Parsing user agents is essential for web analytics, responsive design debugging, and understanding your audience's technology profile.
Chrome's User-Agent string contains 'Mozilla/5.0' and 'Safari' — a legacy of browser compatibility hacks dating back to the 1990s.
Historical Quirk
Key Concepts
User Agent String Components
A typical UA string contains: Mozilla compatibility token, platform/OS info (Windows NT 10.0, Macintosh, Linux), rendering engine (AppleWebKit, Gecko), and browser name/version (Chrome/120, Firefox/121).
User-Agent Client Hints
The new Client Hints API (Sec-CH-UA headers) provides structured, opt-in device information instead of the bloated UA string. It offers browser, platform, and architecture data in clean, parseable format.
Bot and Crawler Detection
Search engine crawlers (Googlebot, Bingbot) and other bots identify themselves via user agent strings. Detecting these helps serve appropriate content and manage server resources.
UA Freezing and Reduction
Chrome is gradually freezing and reducing user agent string information for privacy. Many fields now contain fixed values. Developers should migrate to Client Hints for detailed device information.
Pro Tips
Never rely on user agent strings for security decisions — they can be trivially spoofed by any client.
Use feature detection (Modernizr, CSS @supports) instead of user agent sniffing for browser capability checks.
When analyzing user agents for analytics, use a maintained parsing library rather than custom regex — the format is too inconsistent for manual parsing.
Test your site with various user agents to ensure you are not accidentally blocking legitimate traffic from non-standard clients.
All user agent parsing is performed entirely in your browser. Your user agent string and browsing information are never transmitted to any external server.