You detect headless Chrome by what it says about itself and by what it cannot fake cheaply. The strongest single signal is the User-Agent: by default it contains HeadlessChrome. After that come navigator.webdriver, a graphics renderer that is software rather than a real chip, and the marks a DevTools client leaves on the page. None is proof on its own. Together, and repeated, they are good evidence.
We run into this from the other side. Mosaic drives real browser profiles for warm-up and for measurements, and we learned which of these signals fire by tripping them.
Signal 1: the HeadlessChrome token
Measured on a stock Chrome 152 with no other flags:
headed Mozilla/5.0 (…) Chrome/152.0.0.0 Safari/537.36
headless Mozilla/5.0 (…) HeadlessChrome/152.0.0.0 Safari/537.36
The check is one line, on the server or in the page:
const headlessUA = /HeadlessChrome/.test(navigator.userAgent)
It catches every headless Chrome that did not bother to change its string, and that is more of them than you would expect. Our own warm-up robot ran headless by default for a while, and the profiles it used had their User-Agent set to the engine's own string, so our launcher skipped the override. Those were the best-configured profiles we had, and every site they visited was told HeadlessChrome.
A browser that does override the string pays elsewhere. Passing --user-agent empties Chrome's high-entropy client hints: in our measurement architecture went from "arm" to "". (What a User-Agent override breaks has the table.) So compare the string with navigator.userAgentData.getHighEntropyValues(['architecture', 'platformVersion']). Blank values beside a Chrome User-Agent are not something a normal Chrome produces.
Signal 2: navigator.webdriver
navigator.webdriver "indicates whether the user agent is controlled by automation" (MDN). It is true in Chrome started for WebDriver and by most automation launchers.
const automated = navigator.webdriver === true
It answers a different question from the one in the title. A headed Chrome under Selenium sets it; a headless Chrome launched by hand may not. Read it as "automated", not "headless".
The fingerprint is changed inside the engine, not painted on topIn Mosaic: Fingerprints set inside the browser. Tesseract Chrome: values set inside, not by a script. Free covers 3 profiles with no card, and Pro is $25 a month for any number of them.
Mosaic is a desktop app
Email yourself the link and open it on your computer.
How it works: Fingerprints set inside the browser
Signal 3: no real graphics chip
Headless Chrome drops the real GPU. A page can ask WebGL which renderer it got:
const gl = document.createElement('canvas').getContext('webgl')
const ext = gl && gl.getExtension('WEBGL_debug_renderer_info')
const renderer = ext ? gl.getParameter(ext.UNMASKED_RENDERER_WEBGL) : null
A renderer that names a software rasteriser instead of the chip a matching desktop would have is a strong hint, and the more useful check is consistency: a Mac User-Agent with a renderer no Mac has. This is also the signal with the most false positives, because virtual machines and some remote desktops have no GPU either.
One detail if you write this check yourself: until the page has called getExtension('WEBGL_debug_renderer_info'), the unmasked parameters answer null with an INVALID_ENUM error in a real browser. A spoof that answers them on a fresh context has contradicted Chrome before you read the value.
Signal 4: a DevTools client on the page
Headless Chrome is nearly always driven over the DevTools Protocol, and some of what a client does is visible. The best-known case is Runtime.enable. The detector at deviceandbrowserinfo.com reports it as isAutomatedWithCDP. We measured it one fresh profile per row:
| Sent by the client | Verdict |
|---|---|
Runtime.enable | isBot=true (isAutomatedWithCDP, hasInconsistentTimingResolution) |
Page.enable | isBot=false |
Runtime.evaluate without enabling the domain | isBot=false |
| an isolated world plus evaluate | isBot=false |
Input.dispatchKeyEvent | isBot=false |
Playwright enables Runtime, so this catches the common stack, headed or not.
There is a caution here for anyone writing detection. When we later used Runtime.enable as a deliberate positive control, it fired in only two of four consecutive runs. The flag that carried it, hasInconsistentTimingResolution, is a timing measurement and depends on machine load. A timing-based check needs several samples before it means anything.
Old headless is a different browser
Google's documentation says Chrome "now has unified Headless and headful modes", and that since Chrome 132.0.6793.0 the old Headless mode "is only available as a standalone binary named chrome-headless-shell" (Chrome Headless mode). The old implementation did not share the full browser's code, so it differs from Chrome in more places. If a request looks like Chrome in its string and like nothing else everywhere else, it may be that shell.
Putting the checks together
| Signal | Cost to check | What it proves | False positives |
|---|---|---|---|
HeadlessChrome in the User-Agent | One regex | Headless, and nobody hid it | None in practice |
| Blank high-entropy client hints beside a Chrome string | One async call | The string was overridden | Low |
navigator.webdriver === true | One property | Automation, headed or not | Low |
| Software renderer, or one the claimed OS cannot have | WebGL query | No real GPU, or a spoofed one | VMs, remote desktops |
CDP Runtime enabled | A detector-side script | A DevTools client attached | Possibly people with DevTools open |
Score them rather than blocking on one, and repeat anything based on timing. Public test pages that bundle these checks, such as bot.sannysoft.com, are a quick way to see your own detector's view of a browser you control.
Why Mosaic does not measure headless
Our rule is that a measurement never runs headless, because a headless Chrome grades a browser we do not ship: different User-Agent, no real GPU. Background work in Mosaic runs in a headed browser parked off-screen, with the same renderer and the same User-Agent the profile uses everywhere else. Headless is still there for anyone who asks for it, as Start headless in a profile's menu or through the API, and then the launcher always passes the profile's own User-Agent so the token cannot leak, accepting the emptied client hints as the lesser tell.
Pages are driven without enabling Runtime; queries run in an isolated world, and clicks and keys go through real input events. If you drive a profile with your own tools, attaching over CDP explains what the connection does and does not show a page. The values a profile reports are set inside Tesseract Chrome, inside the engine.
Sources
- Chrome for Developers: Chrome Headless mode, read November 2, 2026
- MDN: Navigator.webdriver, read November 2, 2026
- deviceandbrowserinfo: Are you a bot?, read November 2, 2026






