A headless browser is a real web browser that runs without a visible window and is controlled by code. Tools such as Puppeteer, Playwright and Selenium drive Chrome, Firefox or WebKit this way to load pages, run JavaScript, click and type. Because the engine is genuine, a headless browser renders pages exactly as a user’s browser would.
Developers use headless browsers for testing, monitoring and screenshots. Attackers use them for web scraping, credential stuffing and scalping, and many AI agents browse the same way.
How it works
Chrome’s --headless flag starts the browser without a user interface. The current headless mode runs the same code as normal Chrome. Since Chrome 132, the old, separate implementation ships only as a standalone chrome-headless-shell binary, according to Chrome’s documentation. The automation tool usually controls the browser through the Chrome DevTools Protocol or WebDriver.
How bot detection spots it
Unmodified automation is easy to catch: Chrome sets navigator.webdriver to true when started with --headless or --enable-automation. Stealth plugins and anti-detect browsers remove single tells like that, so modern detection looks for contradictions:
- TLS and HTTP/2 fingerprints that don’t match the claimed browser.
- Software graphics rendering on a device that claims a real GPU.
- Values that differ between the page and a web worker.
- Side effects of driving the browser through the DevTools Protocol.
What survives all of that usually shows up in behavior: straight-line mouse paths, even typing and no time spent reading.
Test your own setup with the browser fingerprint test, and read the guide to headless browser detection.