Advertisement

User Agent Parser

Parse and analyze your browser's User-Agent string. Detect OS, browser version, and device type instantly.

Advertisement

User Agent Strings

A User Agent (UA) string is sent by every browser in HTTP request headers, identifying the browser, version, operating system, and rendering engine. It allows servers to tailor responses for different clients — though UA sniffing is increasingly discouraged in favor of feature detection.

UA String Structure

User-Agent Client Hints (New Standard)

Why do all browsers claim to be Mozilla?

It's historical compatibility. Netscape Navigator used "Mozilla/x.x" and many early servers served rich content only to it. Later browsers added "Mozilla/5.0" to get the same responses. Internet Explorer added "MSIE", Chrome added "Chrome", but all kept the Mozilla prefix. Now it's a meaningless vestige in every modern browser.

Can user agents be spoofed?

Yes, trivially. Any HTTP client can send any User-Agent string. Never use the UA string for security decisions. It's useful for analytics and optimization (e.g., serving smaller images to mobile), but should not be trusted as authentic. DevTools allows easy UA overriding for testing responsive layouts.

How do I get the user agent in JavaScript?

Use navigator.userAgent for the full string. For structured data, use the newer Client Hints API: await navigator.userAgentData.getHighEntropyValues(['platformVersion', 'model']). Client Hints is available in Chromium browsers and returns structured, verifiable data compared to the free-text UA string.