Parse user agent

Parse a User-Agent header into browser, engine, OS, and device hints.

freeworks offlinenothing uploaded
ToolUser Agent Parser
Input
Output
Put this on your own site

The frame below runs the same code as this page, in the reader's own browser. Nothing is sent to us, and nothing is sent to you.

Pick a dark background and the text and panels follow it, so the frame stays readable on a dark page.

Preview

How it works

The header is tokenized and matched against ordered browser, rendering-engine, operating-system, and device patterns. Specific mobile, Chromium, and bot markers precede broad product tokens.

  • The result is a hint because headers are client-controlled.
  • The pattern list favors common families over an exhaustive database.

Worked example

Chrome on Windows
A typical desktop Chrome user agent
Input
											Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36
										
Output
												Browser: Chrome
Browser version: 120.0.0.0
Engine: Blink
Engine version: 120.0.0.0
Os: Windows
Os version: 10 / 11
Device type: desktop
											

When to use this

Access logs, support dashboards, and compatibility fallbacks parse User-Agent headers.

Edge cases

  • A client can spoof any token.
  • Chromium browsers overlap on Chrome tokens and need ordered matching.
  • Privacy-reduced headers may omit device or version fields.

References