Headless Chrome is Google Chrome running without a visible browser window. It still loads pages, executes JavaScript, applies browser rendering rules, and can inspect or capture the result. Developers use it for automated tests, screenshots, PDF generation, DOM inspection, scraping workflows, and unattended jobs in servers or continuous-integration (CI) systems.
The important distinction today is between modern Headless, which uses Chrome’s regular browser implementation, and Headless Shell, the separate binary containing the former implementation. For most browser-faithful testing, start with modern Headless. Consider the shell when a smaller dependency footprint matters more than complete Chrome behavior.
What “headless” means
Chrome for Developers defines the mode this way: “With Chrome Headless mode, you can run the browser in an unattended environment, without any visible UI.” The browser process is present, but there is no window for a person to see or click. Chrome can nevertheless navigate, create a document, run scripts, calculate layout, use storage and cookies, and produce pixels or a PDF.
That makes Headless different from downloading a page with an HTTP client. A command such as curl retrieves response bytes; Headless Chrome runs a browser and observes the page after parsing and script execution. A page whose content appears only after JavaScript runs can therefore be inspected or captured with Headless Chrome.
Quick wins for a faster PC:
Repair Windows errors before they cause bigger problemsFix Now →Scan for outdated or missing drivers - takes under a minuteDriver Scan →#1 Best Overall
Modern Headless versus the old implementation
Modern Headless
Modern Headless was introduced in Chrome 112. It uses the same browser implementation as regular, visible Chrome. Internally, Chrome can create platform windows without displaying them, so the browser follows the same broad code paths used in headful mode. This is the preferred choice when browser fidelity, extensions, and high-accuracy end-to-end testing are important.
Headless Shell
The former Headless implementation was based on Chromium’s //content module rather than the full Chrome browser. Since Chrome 132, that implementation is distributed as a separate chrome-headless-shell binary. Chrome’s documentation describes it as having substantially fewer dependencies and as useful for automated screenshotting or scraping when the full browser is unnecessary.
Those are qualitative trade-offs, not published benchmark results. The available guidance does not establish a particular speed, memory, or reliability advantage for either option. Treat the shell as a smaller, specialized runtime—not as a universally faster Chrome.
What changed in Chrome 132
In Chrome 132, --headless and --headless=new select modern Headless. --headless=old no longer starts the old mode from the regular Chrome binary. A workflow that explicitly depended on the old implementation must either migrate to modern Headless or install and invoke chrome-headless-shell.
What can you do with Headless Chrome?
- Automated UI tests: exercise navigation, forms, authentication, dialogs, and complex client-side interfaces in CI.
- Screenshots: capture a viewport or a full page after scripts, fonts, and images have loaded.
- PDF generation: print a rendered page using Chrome’s print engine.
- DOM inspection: serialize the DOM after parsing and JavaScript execution.
- Unattended workflows: run browser jobs on servers, containers, scheduled workers, and CI/CD agents without a desktop session.
- Scraping and monitoring: collect data or visual evidence from pages that require browser execution, subject to the site’s terms and access controls.
Headless is not automatically faster than visible Chrome, identical across every operating system, or a replacement for server-side rendering. Rendering still consumes CPU, memory, network bandwidth, and time, and differences in fonts, GPU availability, browser version, locale, or sandbox configuration can affect results.
Run the built-in command-line tools
The examples below assume a Chrome executable is available as chrome on your PATH. On Windows or macOS, replace that name with the installed executable path when necessary.
Dump the rendered DOM
chrome --headless --dump-dom https://example.com
--dump-dom serializes the document after Chrome parses it and runs scripts. It is therefore not equivalent to fetching the original HTML with curl. If a page fills its content asynchronously, add an automation wait or use a tool such as Puppeteer so you can wait for a selector or network activity before reading the DOM.
Rank #2
Capture a screenshot
chrome --headless --screenshot=page.png --window-size=1440,900 https://example.com
The window-size setting controls the viewport. A full-page image may require an automation library that measures document height and requests a full-page capture; the simple command captures the visible viewport.
Free tools Windows power users keep installed
One-click scans. No signup required.
Print a PDF
chrome --headless --print-to-pdf=page.pdf https://example.com
Chrome waits for the document to load according to its browser behavior, then sends the rendered page to its print pipeline. For invoices, reports, or pages that continue changing after load, use an explicit wait and print settings through an automation API.
Use Puppeteer for repeatable automation
Puppeteer is a JavaScript library for automating Chrome and Firefox. It exposes navigation, selectors, screenshots, PDFs, and browser events without requiring you to assemble command-line flags for every job. Its documented default downloads a compatible Chrome for Testing binary, which helps teams keep local and CI runs on a known browser version.
Install and launch modern Headless
npm install puppeteer
const puppeteer = require('puppeteer');
(async () => {
const browser = await puppeteer.launch({
headless: true // modern Chrome Headless
});
const page = await browser.newPage();
await page.setViewport({ width: 1440, height: 900, deviceScaleFactor: 1 });
await page.goto('https://example.com', { waitUntil: 'networkidle2' });
await page.screenshot({ path: 'page.png', fullPage: true });
await page.pdf({ path: 'page.pdf', format: 'A4', printBackground: true });
const title = await page.title();
console.log(title);
await browser.close();
})();
headless: true selects modern Headless. Use headless: false when diagnosing a workflow with a visible window. Puppeteer also documents headless: 'shell' for launching the standalone Headless Shell when that binary is installed and appropriate for your job.
Wait for the state you actually need
“Page loaded” can mean different things. waitUntil: 'networkidle2' waits for a quiet network period, but it cannot know whether a particular chart, image, or application state is ready. For deterministic captures, wait for a meaningful selector as well:
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
await page.goto('https://example.com/dashboard', { waitUntil: 'domcontentloaded' });
await page.waitForSelector('[data-testid="dashboard-ready"]', { timeout: 30000 });
await page.screenshot({ path: 'dashboard.png', fullPage: true });
Use stable test hooks such as data-testid rather than timing guesses. If the page never reaches the selector, fail with a useful timeout instead of silently saving an incomplete result.
Choose a mode and automation stack
| Decision | Prefer modern Headless | Consider Headless Shell |
|---|---|---|
| Browser fidelity | Need behavior close to regular Chrome | Full Chrome behavior is unnecessary |
| Extensions or end-to-end testing | Documented fit for extension and high-accuracy tests | Not the first choice |
| Dependencies | Can accept the full browser runtime | Want substantially fewer dependencies |
| Migration | Replacing --headless=old with current Chrome |
Preserving a workflow tied to the former implementation |
Use Puppeteer when JavaScript is your project’s natural language and its browser abstractions fit the test. Use Selenium or another WebDriver-based stack when your organization already standardizes on WebDriver or needs its language ecosystem. Both can launch and drive headless Chrome. Chrome’s automation guidance also places Chrome for Testing and ChromeDriver in reproducible CI workflows.
Rank #3
Reproducible Headless testing
Pin the browser and automation-library versions used by CI rather than allowing an untracked system update to change rendering. Puppeteer’s Chrome for Testing download can provide a compatible binary; teams using another stack should similarly record the Chrome, driver, library, operating-system, locale, timezone, and viewport versions.
- Set a fixed viewport, device scale factor, locale, timezone, and color scheme when those values affect assertions or screenshots.
- Install the same fonts in local and CI images; missing fonts change line wrapping and visual diffs.
- Wait for selectors or application-ready signals, not arbitrary sleeps.
- Keep test data and network dependencies controlled. External ads, analytics, and third-party APIs can make pages nondeterministic.
- Save browser logs, console errors, screenshots, and HTML on failure so a headless failure can be investigated without a visible window.
- Run a visible, non-headless reproduction when debugging; switch back to Headless for unattended execution.
No official source in this article provides a numeric performance comparison between the two Headless implementations. Select the mode from the behavior and dependency requirements above, then measure your own workload if resource planning matters.
The Tool Desk
Outbyte Driver Updater FREEFix the driver behind crashes, sound loss and screen glitchesFind Drivers →Outbyte PC Repair FREEClear out junk files and repair common Windows errorsFree Scan →Common failures and fixes
“Chrome cannot be found”
Install Chrome or Chrome for Testing, ensure the executable is on PATH, or provide Puppeteer’s executablePath. In containers, verify that the image actually contains the browser binary rather than only the Node package.
The process exits with a sandbox error
Use a supported container configuration and run as a non-root user where possible. Some CI images require additional sandbox setup. Disabling the sandbox can reduce security and should be treated as an environment-specific last resort, not a default flag to copy blindly.
The screenshot is blank or incomplete
Check the URL, HTTP status, console errors, authentication, viewport, and resource blocking. Wait for the application’s ready selector, and allow time for lazy images or web fonts. Capture a diagnostic screenshot before changing several settings at once.
--headless=old no longer works
This is expected in Chrome 132 and later. Remove the old flag and test modern --headless, or install the separate chrome-headless-shell binary if preserving the former implementation is a requirement.
Outdated Drivers Are Slowing You Down
One free scan finds every outdated or missing driver and matches the right update for your exact hardware.Free scan · exact hardware matchWindows Errors? Fix Them Before They Spread
Repair common Windows errors and clear accumulated junk for a smoother, more stable PC - no reinstall needed.Free scan · no reinstallHeadless and visible Chrome differ
Compare browser versions, viewport, device scale factor, fonts, permissions, extensions, locale, timezone, and GPU-related settings. Modern Headless shares Chrome’s implementation, but identical application output still depends on the surrounding environment.
Rank #4
Or skip the browser setup
If your goal is a reliable screenshot or PDF rather than operating Chrome yourself, ScreenshotNeo provides a website screenshot API and MCP server. Its request accepts the URL and returns PNG, JPEG, WebP, or PDF output.
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp
See the ScreenshotNeo documentation for the complete option list and response details. Cookie and consent banners are accepted and removed before capture, along with more than 60 known consent platforms, newsletter popups, and chat widgets; each cleanup step can be disabled. Bot checks or CAPTCHAs, blank pages, timeouts, failed loads, and cache hits are not billed, and response headers identify the page verdict and billing result. Its MCP server exposes take_screenshot, get_page_info, and capture_pdf for Claude, Cursor, and other MCP clients. The Free plan includes 1,000 screenshots per month without a card; paid plans start at $5 for 3,000 shots. Sign up for the free plan.
Cost, performance, and operational notes
Running Chrome yourself means paying for the machine, container, network, browser maintenance, and engineering time. Headless does not remove those costs. A smaller shell may simplify deployment, while modern Headless may avoid compatibility work when your tests depend on full Chrome features. Neither conclusion should be converted into a universal speed claim without measuring your pages and CI environment.
A hosted API can be simpler for one-off captures, production thumbnails, or teams that do not want to maintain browser binaries. ScreenshotNeo bills only clean shots and reports billing status in headers, which makes failed-load handling visible to an integration. For high-volume or latency-sensitive systems, compare your required viewport, wait conditions, PDF settings, concurrency, caching, and failure-retry behavior against the service’s documented options.
Frequently Asked Questions
Does Headless Chrome require a display server?
No. Its purpose is to run without a visible UI, so a desktop session is not required. Container and operating-system dependencies still need to be installed correctly.
Is Headless Chrome the same as Chromium?
Headless describes an operating mode, not a separate browser brand. Modern Chrome Headless uses Chrome’s browser implementation; Headless Shell is a separate binary based on the former implementation.
Can I use Headless Chrome for JavaScript-heavy single-page applications?
Yes. It executes page scripts like a browser. Your automation must still wait for the application state you intend to test or capture.
Recommended Free Tools
When should I use a hosted screenshot API instead of Chrome directly?
Use an API when you want a request-based capture workflow and do not want to maintain browser binaries, sandbox configuration, waits, and rendering infrastructure yourself.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

