# Headless browser: what it is and where to run one

Canonical: https://revyl.com/compare/headless-browser/
Published: 2026-11-16
Last updated: 2026-11-16

> A headless browser runs with no visible window. How to run one with Chrome, Puppeteer, Playwright or Selenium, and which cloud services host them.

Last verified: November 16, 2026.

A headless browser is a web browser that runs with no visible window, controlled by code, so scripts, tests and AI agents can use it on servers and in CI. Chrome runs headless with the --headless flag, Puppeteer launches Chrome headless by default, and Playwright, Cypress and Selenium switch it on through options; Browserless, Hyperbrowser and Kernel host headless browsers in the cloud. Revyl, verification infrastructure for cloud agents on web, iOS, Android and macOS, hosts Chrome sessions you and your agents can watch live, with up to 1,200 free device minutes a month on iOS, Android and web.

**Ways to run a headless browser**

| | What it is | How headless is set | Where it runs | Price |
|---|---|---|---|---|
| Chrome | The browser itself; headless and headful Chrome share one code base ([source](https://developer.chrome.com/docs/chromium/headless)) | The --headless flag; the older mode ships separately as chrome-headless-shell ([source](https://developer.chrome.com/docs/chromium/headless)) | Your machine or CI runner, on Linux, macOS or Windows ([source](https://developer.chrome.com/docs/chromium/headless)) | Free ([source](https://support.google.com/chrome/answer/95346?hl=en)) |
| Puppeteer | A JavaScript library that controls Chrome and Firefox ([source](https://github.com/puppeteer/puppeteer)) | Headless by default; headless: false shows the window, headless: 'shell' uses chrome-headless-shell ([source](https://pptr.dev/guides/headless-modes)) | Your machine or CI runner ([source](https://github.com/puppeteer/puppeteer)) | Free, open source ([source](https://github.com/puppeteer/puppeteer)) |
| Playwright | A test runner and library for Chromium, WebKit and Firefox ([source](https://github.com/microsoft/playwright)) | The headless option in the config's use block ([source](https://playwright.dev/docs/test-use-options)) | Your machine or CI runner ([source](https://github.com/microsoft/playwright)) | Free, open source ([source](https://github.com/microsoft/playwright)) |
| Selenium | WebDriver bindings that drive real browsers in many languages ([source](https://www.selenium.dev/documentation/)) | A browser argument such as --headless=new in the browser options ([source](https://www.selenium.dev/blog/2023/headless-is-going-away/)) | Your machine, a CI runner or a Selenium Grid ([source](https://www.selenium.dev/documentation/)) | Free, open source ([source](https://www.selenium.dev/documentation/)) |
| Browserless | Managed headless browsers for automation, with REST APIs and an MCP server ([source](https://docs.browserless.io/overview/intro)) | Puppeteer or Playwright connect over a WebSocket URL ([source](https://docs.browserless.io/overview/intro)) | Browserless cloud, or self-hosted ([source](https://docs.browserless.io/overview/intro)) | Free plan with 1k units a month; paid plans from $25/month billed annually ([source](https://www.browserless.io/pricing)) |
| Hyperbrowser | Cloud browsers, sandboxes, a web data API and browser agents ([source](https://www.hyperbrowser.ai/pricing)) | Browser sessions started through its API ([source](https://www.hyperbrowser.ai/pricing)) | Hyperbrowser cloud ([source](https://www.hyperbrowser.ai/pricing)) | Free with 5,000 credits; browser time $0.10/hour; Startup $30/month ([source](https://www.hyperbrowser.ai/pricing)) |
| Kernel | Cloud browsers for agents, with live view, replays and browser pools ([source](https://www.kernel.sh/docs/info/pricing)) | Headless or headful, priced separately ([source](https://www.kernel.sh/docs/info/pricing)) | Kernel cloud ([source](https://www.kernel.sh/docs/info/pricing)) | Developer plan free with $5 of usage a month; headless browsers about $0.06/hour of usage ([source](https://www.kernel.sh/docs/info/pricing)) |
| Revyl | A hosted Chrome session for your web app, streamed to your browser, with tests, reports and agent control ([source](https://docs.revyl.com/sessions)) | Nothing to set: Revyl runs Chrome, and you watch it live when you want to ([source](https://docs.revyl.com/sessions)) | Revyl's cloud, started from the dashboard, revyl device start --platform web, CI or the MCP server ([source](https://docs.revyl.com/infrastructure/quickstart)) | $0 to start: up to 1,200 free device minutes a month on iOS, Android and web. Pro: web at $0.05 a minute ($3 per browser-hour) ([source](https://revyl.com/pricing/)) |

## What is a headless browser?

A headless browser is a normal web browser running with no window on screen. Code drives it instead of a person: it loads pages, runs their JavaScript, clicks and types, and returns HTML, screenshots or test results. [Chrome's docs](https://developer.chrome.com/docs/chromium/headless) describe it as running Chrome in an unattended environment without any visible UI. Because nothing is drawn on a display, a headless browser runs on servers, in containers and on CI runners.

Headless is a mode of a browser you already know. [Selenium's maintainers](https://www.selenium.dev/blog/2023/headless-is-going-away/) call it an execution mode for Firefox and Chromium-based browsers, and the same browser can run headed when you want to watch it.

## How do you run a headless browser locally?

Each tool turns headless mode on in its own way:

- Chrome: start the binary with `--headless`, for example `google-chrome --headless` on Linux or `start chrome --headless` on Windows ([Chrome Headless mode](https://developer.chrome.com/docs/chromium/headless)).
- Puppeteer: `puppeteer.launch()` starts Chrome headless by default. `headless: false` shows the window, and `headless: 'shell'` uses the separate `chrome-headless-shell` binary ([Puppeteer headless modes](https://pptr.dev/guides/headless-modes)).
- Playwright: set `headless` in the `use` block of `playwright.config.ts`, or override it per file with `test.use()` ([test options](https://playwright.dev/docs/test-use-options)).
- Cypress: `cypress run` launches the browser headlessly by default, and `--headed` shows it ([launching browsers](https://docs.cypress.io/app/references/launching-browsers)).
- Selenium: add the browser argument, such as `options.addArguments("--headless=new")` for Chrome. Selenium removed its old headless convenience method in 4.10.0, so you pick the mode yourself ([Selenium blog](https://www.selenium.dev/blog/2023/headless-is-going-away/)).

## Should you run headless or headed?

Run headless for CI jobs, scrapers and backend services on machines that have no display. Chrome now uses one code base for both modes ([Chrome Headless mode](https://developer.chrome.com/docs/chromium/headless)). The older implementation ships as `chrome-headless-shell`, and Puppeteer says it is more performant where the full Chrome feature set isn't needed ([Puppeteer](https://pptr.dev/guides/headless-modes)).

Run headed when a person needs to see what happened: while writing a test, while debugging a failure, or when a reviewer wants to watch an agent work. A hosted browser with a live view covers both cases, because the browser runs remotely and you open the view only when you need it.

## Where can you run headless browsers in the cloud?

Hosted browser services run the browsers for you, and your code connects to a remote endpoint instead of launching Chrome locally. Safari is its own case on a Windows machine; [testing Safari on Windows](/compare/test-safari-on-windows/) covers it.

- [Browserless](https://docs.browserless.io/overview/intro) runs managed headless browsers that Puppeteer or Playwright connect to over WebSocket, with REST APIs for screenshots, PDFs and scraping, an [MCP server](https://docs.browserless.io/mcp/overview) and a self-hosted option.
- [Hyperbrowser](https://www.hyperbrowser.ai/pricing) sells cloud browser sessions, sandboxes, a web data API and browser agents on one credit balance.
- [Kernel](https://www.kernel.sh/docs/info/pricing) runs headless and headful browsers for agents, with live view, replays and browser pools. Plans and per-second rates are on its [pricing page](https://www.kernel.sh/docs/info/pricing).

For hosted grids that run Selenium, Playwright and Cypress suites, see [browser testing clouds compared](/compare/browser-testing-clouds-compared/).

## How does Revyl run browsers for tests and agents?

Revyl runs your web app in a [Chrome session in its cloud](https://docs.revyl.com/sessions) and streams it to your browser, so there's no local browser, driver or display to manage. One session serves a test run, an agent and a person.

1. Open your build. Register an HTTPS preview URL from any framework, or let Revyl build a bundle from its Next.js or Vite recipe ([Web builds](https://docs.revyl.com/builds/web)).
2. Start a session from the dashboard, with `revyl device start --platform web`, or through the MCP server's `start_device_session` tool, in a Desktop 1280×800 or Mobile 390×844 viewport ([quickstart](https://docs.revyl.com/infrastructure/quickstart), [MCP tools](https://docs.revyl.com/reference/mcp-tools)).
3. Test it in plain language. A Web test is a list of natural-language steps, and AI finds each element on the page instead of relying on selectors. `revyl test run` and the GitHub Action run tests in CI ([tests](https://docs.revyl.com/tests)).
4. Read the evidence. Each run leaves a [report](https://docs.revyl.com/tests/reports) with video, a step timeline, the Web console and request failures, and a JavaScript heap chart.
5. Watch or take over. The live viewer shows the session as it runs, and a member can click, scroll and type in it, with each input recorded as a step ([sessions](https://docs.revyl.com/sessions)).
6. Put the verdict on the pull request. When [proof of changes](https://docs.revyl.com/agents/proof) is enabled, Revyl posts a verdict on pull requests with a configured build, with an Open preview link to the live Web session.

## Can Revyl replace a headless browser setup?

Yes, for testing your own web app and for giving coding agents a browser they can drive. Revyl hosts Chrome, runs the tests, keeps a report for every test run and, with proof of changes, posts a verdict on the pull request, so nobody maintains browsers, drivers or a display on CI. Revyl Web tests are natural-language steps, so a Puppeteer or Playwright script becomes a list of steps rather than a script pointed at a new endpoint. For scraping other sites at volume, Browserless and Hyperbrowser list CAPTCHA solving and residential proxies on their pricing pages.

For the frameworks themselves, see [browser automation tools](/compare/browser-automation-tools/) and [Playwright alternatives](/compare/best-playwright-alternatives/). Every comparison is on the [compare hub](/compare/).

## Beyond headless browsers: what else Revyl runs

The Chrome session is one runtime on the same Revyl account:

- iOS simulators and Android emulators start from the dashboard, the CLI or an agent and stream to your browser, so the mobile app gets the same tests and reports as the web app ([sessions](https://docs.revyl.com/sessions)).
- A Revyl computer is a macOS workspace where an agent builds, runs and tests apps, for work such as Xcode builds and Swift tests ([Revyl computers](https://docs.revyl.com/computers)).
- Revyl Atlas maps Web, iOS and Android apps the same way and keeps the screens, states and transitions Revyl has observed as the shared record for people and agents ([Atlas](https://docs.revyl.com/atlas)).
- Coding agents reach every runtime through the same CLI and [MCP server](https://docs.revyl.com/agents/mcp) they use for the browser.
- Every test run leaves a report, and when proof of changes is enabled, Revyl posts a verdict on pull requests with a configured build ([reports](https://docs.revyl.com/tests/reports), [proof of changes](https://docs.revyl.com/agents/proof)).

## Common questions

**What is a headless browser used for?**

Automated testing, scraping, screenshots and PDFs, and giving scripts or AI agents a browser on a machine with no display, such as a server or a CI runner. Chrome's docs describe Headless mode as running the browser in an unattended environment without any visible UI.

**Is headless Chrome the same as normal Chrome?**

Yes, in current versions. Chrome now has unified headless and headful modes that share the same browser code. Since Chrome 132 the older, separate implementation is available only as a standalone binary called chrome-headless-shell, which Puppeteer describes as more performant for tasks that don't need the full Chrome feature set.

**How do I run Selenium in headless mode?**

Pass the headless flag as a browser argument, for example options.addArguments("--headless=new") for Chrome. Selenium deprecated its headless convenience method in 4.8.0 and removed it in 4.10.0, so the argument is the supported way.

**Does Cypress run headless?**

Yes. cypress run launches browsers headlessly by default, and the --headed flag shows the browser window.

**Can an AI agent use a headless browser?**

Yes. Browserless ships an MCP server, and Hyperbrowser and Kernel sell cloud browsers built for agents. For checking your own web app, Revyl's MCP server starts a Chrome session with start_device_session and gives the agent scroll, select and key tools, while a person can watch the same session live.

**What else does Revyl do?**

Revyl is verification infrastructure for cloud agents on web browsers, iOS simulators, Android emulators and macOS workspaces. It builds Web, iOS and Android apps on remote runners, runs natural-language tests that leave a report with video and logs, keeps Atlas as the shared record of what each app does, and when proof of changes is enabled, posts a verdict on pull requests with a configured build. Agents reach all of it through the CLI and MCP server.

## Sources

- [Chrome Headless mode](https://developer.chrome.com/docs/chromium/headless)
- [Install Google Chrome](https://support.google.com/chrome/answer/95346?hl=en)
- [Puppeteer headless modes](https://pptr.dev/guides/headless-modes)
- [Puppeteer repository](https://github.com/puppeteer/puppeteer)
- [Playwright test options](https://playwright.dev/docs/test-use-options)
- [Playwright repository](https://github.com/microsoft/playwright)
- [Cypress launching browsers](https://docs.cypress.io/app/references/launching-browsers)
- [Selenium documentation](https://www.selenium.dev/documentation/)
- [Selenium: Headless is going away](https://www.selenium.dev/blog/2023/headless-is-going-away/)
- [Browserless introduction](https://docs.browserless.io/overview/intro)
- [Browserless pricing](https://www.browserless.io/pricing)
- [Browserless MCP overview](https://docs.browserless.io/mcp/overview)
- [Hyperbrowser pricing](https://www.hyperbrowser.ai/pricing)
- [Kernel pricing](https://www.kernel.sh/docs/info/pricing)
- [Revyl sessions](https://docs.revyl.com/sessions)
- [Revyl device quickstart](https://docs.revyl.com/infrastructure/quickstart)
- [Revyl Web builds](https://docs.revyl.com/builds/web)
- [Revyl tests](https://docs.revyl.com/tests)
- [Revyl test reports](https://docs.revyl.com/tests/reports)
- [Revyl MCP tools](https://docs.revyl.com/reference/mcp-tools)
- [Revyl MCP](https://docs.revyl.com/agents/mcp)
- [Revyl computers](https://docs.revyl.com/computers)
- [Revyl Atlas](https://docs.revyl.com/atlas)
- [Revyl proof of changes](https://docs.revyl.com/agents/proof)
- [Revyl pricing](https://revyl.com/pricing/)
