User-Agent Parser/ Browser · OS · Device
Parse User-Agent strings to identify browser, version, OS, device type, and rendering engine. Auto-fills your current browser's UA.
User-Agent
Examples
Did this tool solve your problem?
Code Examples
JavaScript (Browser)
// Current browser's UA
navigator.userAgent
// Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7)...
// Modern: UA Client Hints (Chrome 90+)
const uaData = navigator.userAgentData;
uaData.brands // [{brand:'Chromium',version:'124'},...]
uaData.mobile // false
uaData.platform // 'macOS'
// High-entropy hints (requires user permission)
const hints = await uaData.getHighEntropyValues([
'platformVersion', 'architecture', 'model'
]);
hints.platformVersion // '14.0.0'
hints.architecture // 'arm'Node.js / Express
// npm install ua-parser-js
const UAParser = require('ua-parser-js');
app.get('/api', (req, res) => {
const ua = req.headers['user-agent'];
const parser = new UAParser(ua);
const result = parser.getResult();
// result.browser → { name: 'Chrome', version: '124.0' }
// result.os → { name: 'macOS', version: '14' }
// result.device → { type: 'mobile', model: 'iPhone' }
// result.engine → { name: 'Blink', version: '124.0' }
res.json(result);
});
// Next.js (App Router)
import { headers } from 'next/headers';
const ua = headers().get('user-agent') ?? '';Python
# pip install user-agents from user_agents import parse ua_string = ( 'Mozilla/5.0 (iPhone; CPU iPhone OS 17_4 ' 'like Mac OS X) AppleWebKit/605.1.15 ' '(KHTML, like Gecko) Version/17.4.1 ' 'Mobile/15E148 Safari/604.1' ) ua = parse(ua_string) ua.browser.family // 'Mobile Safari' ua.browser.version // (17, 4, 1) ua.os.family // 'iOS' ua.os.version // (17, 4) ua.device.family // 'iPhone' ua.is_mobile // True ua.is_bot // False
Go
// go get github.com/mssola/useragent import "github.com/mssola/useragent" ua := useragent.New( "Mozilla/5.0 (Windows NT 10.0; Win64; x64)" + " AppleWebKit/537.36 Chrome/124.0.0.0 Safari/537.36") ua.Mobile() // false ua.Bot() // false name, ver := ua.Browser() // name = "Chrome", ver = "124.0.0.0" ua.OS() // "Windows 10" ua.Platform() // "Windows"
Frequently Asked Questions
What is a User-Agent?
The User-Agent (UA) is an HTTP request header that browsers and clients use to identify themselves to servers — including browser type, version, OS, and rendering engine. Servers can use the UA to serve device-optimized content.
Why do all browsers claim to be Mozilla?
Historical reasons. Netscape Navigator used Mozilla/x.x; Internet Explorer adopted the same prefix to receive content meant for Netscape; every browser since has inherited this pattern for historical compatibility.
How do I get the User-Agent on the server?
The User-Agent request header is available on any HTTP server. Node.js/Express: req.headers['user-agent']. Python Flask: request.headers.get('User-Agent'). Go: r.Header.Get("User-Agent").
What does Googlebot's User-Agent look like?
Googlebot's UA: Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html). UAs can be spoofed, so for production bot detection, combine UA checking with reverse DNS verification.
What are User-Agent Client Hints?
UA Client Hints (UA-CH) is a new Chrome standard designed to gradually replace the legacy UA string, providing more structured device information while reducing privacy leakage.
Can User-Agents be faked?
Yes — the UA is entirely client-controlled and trivially modified. Never rely on UA checking for security decisions. Mobile detection and bot filtering should be combined with other signals like IP reputation and behavioral patterns.