# What Is a Headless Browser?

Source: https://www.sneakerdev.com/glossary/headless-browser
Updated: 2026-11-24

> A headless browser is a web browser that runs without a visible window and is controlled by code instead of a person. It loads pages, runs JavaScript and renders content like a normal browser, which makes it the standard tool for automated testing, screenshots and scraping JavaScript-heavy websites. Popular ways to control one include Puppeteer, Playwright and Selenium.

## Headless browser definition

A **headless browser** is a full browser engine, such as Chromium, Firefox or WebKit, running without its graphical user interface. Instead of clicking and typing, a program sends it commands: open this URL, wait for this element, click this button, return the HTML or take a screenshot.

Because it is a real browser engine, a headless browser executes JavaScript, applies CSS, handles cookies and storage, and builds the same page a human would see. That is the key difference from a plain HTTP client, which downloads the raw response and nothing else.

## How headless browsers are controlled

Automation libraries talk to the browser through a remote control protocol:

- **Chrome DevTools Protocol (CDP):** the low-level protocol Chromium exposes for debugging and automation. Puppeteer, developed by the Chrome team, uses it, and Playwright uses it for Chromium.
- **WebDriver and WebDriver BiDi:** the W3C standard protocols behind Selenium and supported by all major browsers.
- **Playwright:** a Microsoft open-source framework that drives Chromium, Firefox and WebKit through one API.

Chrome historically shipped a separate, lighter headless implementation. In 2023 Google introduced a "new headless" mode that runs the same code as regular Chrome, which made headless Chrome behave much more like the desktop browser.

## What headless browsers are used for

- **Automated testing:** end-to-end tests in CI pipelines, where no screen is available.
- **Screenshots and PDFs:** rendering pages or reports on a server.
- **Scraping dynamic sites:** pages that build their content with JavaScript or load data after user interaction. See [best proxies for web scraping](https://www.sneakerdev.com/guides/best-proxies-for-web-scraping).
- **Monitoring:** checking that a checkout or login flow still works, or watching product pages, as in [restock monitors](https://www.sneakerdev.com/guides/restock-monitors-explained).
- **Generating valid sessions:** some automation tools use a browser to pass JavaScript challenges and collect cookies before continuing with lighter requests.

## Headless browser vs HTTP client

| | Headless browser | HTTP client |
|---|---|---|
| Runs JavaScript | Yes | No |
| Fingerprint | Real browser [TLS](https://www.sneakerdev.com/glossary/tls-fingerprinting) and JS environment | Library fingerprint |
| Speed | Slower, seconds per page | Fast, milliseconds per request |
| Resource use | High CPU and memory | Very low |
| Bandwidth | Loads images, fonts and scripts | Only what you request |

That bandwidth difference matters with per-GB [residential proxies](https://www.sneakerdev.com/glossary/residential-proxy); blocking images and media where possible keeps costs down, and the [proxy cost calculator](https://www.sneakerdev.com/tools/proxy-cost-calculator) helps estimate the bill.

## How websites detect headless browsers

Antibot systems look for traces that a browser is automated rather than used by a person. Well-known signals include:

- **navigator.webdriver** set to true, which the WebDriver specification requires for automated sessions.
- **"HeadlessChrome"** in the User-Agent of older headless modes.
- Missing or unusual values for plugins, languages, screen size, permissions or WebGL renderer.
- Side effects of CDP being attached to the page.
- Behaviour: no mouse movement, instant form filling, perfectly regular timing.

These checks are part of wider [browser fingerprinting](https://www.sneakerdev.com/glossary/browser-fingerprinting). The open-source community maintains "stealth" plugins that patch common signals, which are discussed in [Playwright and Puppeteer stealth](https://www.sneakerdev.com/guides/playwright-and-puppeteer-stealth). Detection and patching evolve constantly, so no configuration is permanently undetectable.

## Pros and cons

**Pros**

- Handles JavaScript-heavy sites and challenges that plain clients cannot.
- Produces a genuine browser TLS and HTTP/2 fingerprint.
- Mature, free, well-documented open-source tooling.

**Cons**

- Much slower and more resource-hungry than HTTP requests.
- Higher bandwidth per page.
- Automation artefacts can still give it away.

## How to evaluate headless browser tools and services

Look at which engines are supported, how close the fingerprint is to a stock browser, how quickly updates follow new browser releases, and the cost of running browsers at your scale. Hosted browser services and [antidetect browsers](https://www.sneakerdev.com/glossary/antidetect-browser) trade money for less infrastructure work. Browse options in the [browsers category](https://www.sneakerdev.com/categories/browsers).

## Frequently asked questions

### What is the difference between headless and headful browsers?

A headful browser shows a window on screen, while a headless browser runs the same engine without one. Both load and render pages, but headless is designed for servers and automation.

### Is Puppeteer a headless browser?

Puppeteer is a Node.js library that controls Chrome or Chromium, usually in headless mode. The headless browser is Chrome itself; Puppeteer is the remote control.

### Can websites detect headless browsers?

Yes. They check signals such as navigator.webdriver, inconsistent browser properties and non-human behaviour. Modern headless modes are harder to spot but not invisible.

### Is using a headless browser legal?

Yes, it is a standard development tool. Legality depends on what you do with it, such as respecting site terms, privacy law and access restrictions.
