Playwright and Puppeteer user agents
Playwright and Puppeteer are browser-automation libraries that drive real Chromium, Firefox, or WebKit instances. Because they use the actual browser engine, their default user agent matches a normal browser — sometimes with a HeadlessChrome marker — so the user agent alone rarely reveals them. Detection relies on automation signals, not the string.
What this means
Playwright and Puppeteer control full browser engines (Chromium, and for Playwright also Firefox and WebKit). Because they render with the real engine, by default they present a normal browser user agent. Puppeteer's headless Chromium has historically included a HeadlessChrome marker in its user agent, but that is easily overridden and newer headless modes may not show it.
The practical consequence: you cannot reliably detect these tools from the user agent. They look like browsers because they are browsers.
Signals beyond the user agent
More reliable automation signals include the navigator.webdriver property (true under automation per the WebDriver spec), absence of expected browser headers or plugins, headless rendering quirks, and behavioural patterns like inhumanly fast navigation or no mouse movement.
Operators of these tools can spoof the user agent and patch some signals, so detection is probabilistic. Combine multiple signals rather than relying on any single one, and never treat the user agent as proof.
- Default UA matches a real browser; headless Chromium may show HeadlessChrome
- navigator.webdriver is true under WebDriver-controlled automation
- Behavioural and header signals matter more than the UA string
How to treat this traffic
If you operate the automation (testing, monitoring), set a custom user agent identifying it so your own logs are clean. If you are defending against unwanted automation, weigh combined signals and apply rate limiting or challenges rather than UA-substring blocks, which both miss spoofed agents and risk blocking real browsers.
Because Playwright and Puppeteer drive real engines, they execute JavaScript and load assets, so JS-based detection differs from how you would catch simple HTTP libraries.
How it appears in analytics and logs
A request from Playwright or Puppeteer usually carries a browser-like user agent, optionally containing HeadlessChrome when running headless Chromium. The user agent is a weak signal; automation is better identified by navigator.webdriver, missing browser headers, and behavioural patterns.
Diagnostic use case
Understand why Playwright and Puppeteer traffic blends in with real browsers, and which automation signals (beyond the user agent) actually distinguish it.
What WebmasterID can help detect
WebmasterID looks at automation signals server-side rather than trusting the browser-like user agent, so headless Playwright/Puppeteer traffic can be separated from genuine human visits where signals allow.
Common mistakes
- Trying to block Playwright/Puppeteer by user-agent substring — the default looks like a real browser.
- Assuming HeadlessChrome will always be present; it is overridable and mode-dependent.
- Treating any single automation signal as definitive proof.
Privacy and accuracy notes
Detecting headless automation uses request and capability signals, not human identity. WebmasterID treats confirmed automation as a bot event, separate from human analytics, without fingerprinting individuals.
Frequently asked questions
- Can I detect Puppeteer from the user agent?
- Not reliably. Headless Chromium may include a HeadlessChrome marker, but it is easily overridden. Use navigator.webdriver and behavioural signals alongside the UA, never the UA alone.
Related pages
- Headless browser user agents
Headless browsers run a real browser engine without a visible window, and are widely used for testing and scraping. Headless Chrome historically exposed a HeadlessChrome token, though automation can also wear an ordinary browser string. This page explains the patterns and why headless traffic is automation.
- Selenium WebDriver user agent
Selenium automates real browsers through the W3C WebDriver protocol. Because it controls an actual browser, its user agent is the browser's own, with no Selenium token by default. The reliable tell is the WebDriver automation state (navigator.webdriver) and behavioural signals, not the user-agent string.
- Detecting automation from user agents
You can use the user agent as a first signal for spotting automation — tool tokens, headless markers, missing strings — but it is never conclusive, because any client can change it. Reliable detection pairs the UA with verification and behaviour, and records honest unknowns. This page explains a sound approach.
- Bot vs human
Separate headless automation from genuine human visits.
Sources and verification notes
Last reviewed 2026-06-24. Facts are checked against primary/official sources where available; uncertain specifics are marked “Data not yet verified” rather than guessed.