Chrome Headless can capture a web page without opening a visible browser window. For a one-off image, run Chrome with --headless and --screenshot. For repeatable application code, use Puppeteer’s page.screenshot(); use the Chrome DevTools Protocol (CDP) when you need lower-level control, or Selenium when your test suite already uses WebDriver.
This guide covers deterministic viewports, delayed and timer-driven content, full-page images, remote debugging, common failures, and a managed alternative when installing and operating Chrome is not worthwhile.
What Chrome Headless screenshot capture does
Headless mode runs Chrome without a visible user interface. It uses Chrome’s normal browser implementation, so the page is laid out and painted by the same core engine used in headful Chrome. A screenshot is therefore the rendered result after navigation, script execution, fonts, images, and CSS have been processed—not merely the HTML response.
The current unified Headless mode is the normal Chrome implementation. Since Chrome 132.0.6793.0, the older Headless implementation is distributed separately as the chrome-headless-shell binary. Prefer current --headless mode for new work; select a shell mode only when a specific Puppeteer version or legacy environment requires it.
Recommended Free Tools
#1 Best Overall
- CRISP CLARITY: This 23.8″ Philips V line monitor delivers crisp Full HD 1920x1080 visuals. Enjoy movies, shows and videos with remarkable detail
- INCREDIBLE CONTRAST: The VA panel produces brighter whites and deeper blacks. You get true-to-life images and more gradients with 16.7 million colors
- THE PERFECT VIEW: The 178/178 degree extra wide viewing angle prevents the shifting of colors when viewed from an offset angle, so you always get consistent colors
- WORK SEAMLESSLY: This sleek monitor is virtually bezel-free on three sides, so the screen looks even bigger for the viewer. This minimalistic design also allows for seamless multi-monitor setups that enhance your workflow and boost productivity
- A BETTER READING EXPERIENCE: For busy office workers, EasyRead mode provides a more paper-like experience for when viewing lengthy documents
Fastest method: the Chrome --headless --screenshot command
Install Chrome or Chromium on the machine where the command will run, then execute:
chrome --headless=new --screenshot --window-size=412,892 https://developer.chrome.com/
Chrome writes screenshot.png to the current working directory. The explicit --window-size=412,892 makes the viewport reproducible; without it, the result depends on the browser’s default dimensions and may differ between environments.
Choose the capture timing
Many pages continue loading after the initial document response. Add a real-time delay when you need to give network requests and JavaScript time to finish:
chrome --headless=new --screenshot --window-size=1440,900 --timeout=5000 https://example.com/
--timeout=5000 waits five seconds before the capture. This is wall-clock time, so it is useful when the page depends on network activity or asynchronous work.
For pages driven by timers, use a virtual-time budget:
chrome --headless=new --screenshot --window-size=1440,900 --virtual-time-budget=5000 https://example.com/
--virtual-time-budget=5000 advances page time while allowing scripts to observe elapsed virtual time. It can make animation or delayed rendering deterministic without waiting five real seconds. It is not a substitute for a network wait when the required resource has not arrived.
Make output predictable
- Use an absolute, fully qualified URL, including
https://. - Set
--window-size=WIDTH,HEIGHTfor every automated job. - Run from a known output directory or move the generated
screenshot.pngimmediately after capture. - Use a fixed Chrome version in CI when pixel-level comparisons matter.
- Allow enough timeout for fonts, images, and client-side data, but avoid an arbitrary delay when a specific readiness signal is available.
Automating screenshots with Puppeteer
Puppeteer is the most approachable JavaScript API for Chrome screenshot automation. It launches a browser, creates a page, navigates, waits for a chosen condition, and calls page.screenshot().
Rank #2
- CRISP CLARITY: This 22 inch class (21.5″ viewable) Philips V line monitor delivers crisp Full HD 1920x1080 visuals. Enjoy movies, shows and videos with remarkable detail
- 100HZ FAST REFRESH RATE: 100Hz brings your favorite movies and video games to life. Stream, binge, and play effortlessly
- SMOOTH ACTION WITH ADAPTIVE-SYNC: Adaptive-Sync technology ensures fluid action sequences and rapid response time. Every frame will be rendered smoothly with crystal clarity and without stutter
- INCREDIBLE CONTRAST: The VA panel produces brighter whites and deeper blacks. You get true-to-life images and more gradients with 16.7 million colors
- THE PERFECT VIEW: The 178/178 degree extra wide viewing angle prevents the shifting of colors when viewed from an offset angle, so you always get consistent colors
Complete Node.js example
import puppeteer from 'puppeteer';
const browser = await puppeteer.launch({
headless: true
});
try {
const page = await browser.newPage();
await page.setViewport({ width: 1440, height: 900, deviceScaleFactor: 1 });
await page.goto('https://example.com', { waitUntil: 'networkidle2', timeout: 30000 });
await page.screenshot({ path: 'example.png', fullPage: true });
} finally {
await browser.close();
}
Install Puppeteer in the project with npm install puppeteer. The package downloads a compatible browser unless your deployment is configured to use a system Chrome. waitUntil: 'networkidle2' waits for a low level of network activity; it is a useful default, but pages with analytics, polling, or WebSockets may never become truly idle. In those cases, wait for a page-specific selector or use a bounded delay.
Free tools Windows power users keep installed
One-click scans. No signup required.
Useful Puppeteer screenshot options
pathwrites an image file. Omit it to receive image bytes.fullPage: truecaptures the complete page rather than only the viewport.type: 'png','jpeg', or'webp'selects the output format where supported by your Puppeteer version.qualityapplies to lossy formats such as JPEG and WebP.clipcaptures a rectangle withx,y,width, andheight.encoding: 'base64'returns a base64 string; otherwise the API returns aUint8Array.omitBackground: truerequests a transparent background when the page and output format support it.
To capture one element instead of the whole document, locate it and pass its bounding box as a clip:
const card = await page.$('.pricing-card');
if (!card) throw new Error('pricing card not found');
const box = await card.boundingBox();
if (!box) throw new Error('pricing card is not visible');
await page.screenshot({ path: 'card.png', clip: box });
Page creation and browser closing wait for an in-progress screenshot in the same BrowserContext. Still, always await the screenshot before closing the browser so the output is flushed.
Wait for a known readiness signal
A selector is usually more reliable than a fixed sleep:
await page.goto('https://example.com/dashboard', { waitUntil: 'domcontentloaded' });
await page.waitForSelector('[data-rendered="true"]', { timeout: 20000 });
await page.screenshot({ path: 'dashboard.png', fullPage: true });
For a timer-driven component, combine a bounded delay with a selector or use page.waitForFunction(). Avoid waiting forever: every wait should have a timeout and an error message that identifies the missing condition.
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 reinstallUsing the Chrome DevTools Protocol directly
CDP is the lower-level interface behind much browser automation. The Page.captureScreenshot command lets a CDP client request a screenshot and control protocol-level parameters such as format, quality, clipping, and whether to capture beyond the viewport.
Launch a debuggable Chrome instance
chrome --headless=new --remote-debugging-port=0 --user-data-dir=/tmp/chrome-shot https://example.com/
With port 0, Chrome chooses an available port and prints a WebSocket browser endpoint such as ws://127.0.0.1:PORT/devtools/browser/.... A CDP client connects to that endpoint, selects a page target, enables the Page domain, and sends Page.captureScreenshot. The response contains base64-encoded image data that your client decodes and writes to disk.
Rank #3
- Clear visuals. Fluid motion: A 144Hz refresh rate and 1ms MPRT deliver smooth, tear‑free motion across work, gaming, and streaming for clearer, more fluid viewing.
- Eye comfort: TÜV Rheinland 3‑star* certification reduces harmful blue light while preserving stunning color quality without compromise. *TÜV Rheinland 3-star eye comfort certification.
- Wide viewing angle: Get consistent views across a wide 178° /178° viewing angle.
- In-Plane Switching (IPS): See excellent color accuracy and consistency across wide viewing angles with In-plane Switching (IPS) technology.
- Ultra-thin bezels: Maximize your viewing experience with thin bezels.
Use CDP when an existing service already speaks the protocol, when you need commands not exposed by your higher-level library, or when you are integrating tightly with DevTools events. For ordinary JavaScript automation, Puppeteer avoids target discovery and message framing work.
Using Selenium WebDriver
Selenium is a practical choice when screenshots are part of an existing cross-browser test suite. Add Chrome’s headless argument, navigate, save the image, and always quit the driver:
from selenium import webdriver
from selenium.webdriver.chrome.options import Options
options = Options()
options.add_argument("--headless")
options.add_argument("--window-size=1440,900")
driver = webdriver.Chrome(options=options)
try:
driver.get("https://example.com")
driver.save_screenshot("example.png")
finally:
driver.quit()
Choose Selenium for a WebDriver-centered codebase or a test matrix that already includes other browsers. Choose Puppeteer for a JavaScript-first screenshot service and CDP for protocol-level control.
Which Chrome screenshot route should you choose?
| Route | Abstraction | Best fit | Timing and output control | Debugging |
|---|---|---|---|---|
| Chrome CLI | Lowest setup for one command | Manual jobs, shell scripts, CI smoke checks | Viewport, real-time timeout, virtual-time budget, PNG output | Remote debugging can be enabled |
| Puppeteer | High-level JavaScript API | Node.js services and scripts | Selectors, network conditions, full page, clips, formats, and bytes | Page events, console listeners, and DevTools connection |
| CDP | Lowest-level browser protocol | Existing CDP infrastructure or specialized control | Direct Page.captureScreenshot parameters and protocol events |
Direct target and DevTools inspection |
| Selenium | WebDriver automation | Existing Selenium test suites and multi-browser workflows | Driver capabilities plus screenshot methods | WebDriver logs and browser inspection |
Debugging headless rendering with chrome://inspect
Headless has no visible window, but it can expose the same DevTools inspection workflow as visible Chrome. Start it with --remote-debugging-port=0, note the printed host and port, then open another Chrome instance and visit chrome://inspect. Configure the host and port if necessary and inspect the live target.
This is useful for determining whether the problem is navigation, a missing resource, an unexpected viewport, a JavaScript exception, or a capture that happened before rendering completed. Inspect the DOM, computed styles, console, network panel, and screenshots while the headless process is still running.
Common failures and fixes
The file is blank, old, or missing
- Cause: the process captured before client-side rendering completed. Fix: use a readiness selector, a bounded
--timeout, or Puppeteer’swaitForSelector. - Cause: the command wrote to a different current directory. Fix: print the working directory and use an explicit destination after capture.
- Cause: the page returned an error document. Fix: log the final URL and HTTP/navigation errors before saving the image.
The page is cut off
The CLI captures the viewport-sized image. Set a larger --window-size or use Puppeteer with fullPage: true. For one component, use a measured clip rather than guessing coordinates.
Do these 3 things before closing this tab:
1Scan for outdated or missing drivers - takes under a minute2Repair Windows errors before they cause bigger problems3Fix the driver behind crashes, sound loss and screen glitchesFonts or images differ from a visible browser
Wait for the relevant resources, confirm the same URL and viewport, and check that the headless machine can reach the asset hosts. A screenshot taken before web fonts load can reflow the entire page. For stable visual tests, pin browser versions and avoid capturing while animations are active.
Rank #4
- CURVED FOR ENHANCED ENGAGEMENT: An immersive viewing experience with a curved monitor that wraps more closely around your field of vision; It creates a wider view, enhancing depth perception and minimizing peripheral distraction
- SMOOTH PERFORMANCE FOR SEAMLESS CONTENT: Stay in the action when playing games, watching videos, or working on creative projects; The 100Hz refresh rate reduces lag and motion blur so you don't miss a thing in fast-paced moments¹
- MORE GAMING POWER: Gain the edge with optimizable game settings; Color and image contrast can be adjusted to see scenes more vividly and spot enemies hiding in the dark; Game Mode adjusts any game to fill the screen so you can view every detail²
- KEEP IT EASY ON THE EYES: Care for your eyes and stay comfortable, even during long sessions; Advanced eye comfort technology certified by TÜV reduces eye strain by minimizing blue light and reducing irritating screen flicker²
- INCREASED VERSATILITY: Connect to more; Plug devices straight into your monitor for increased flexibility, making your computing environment even more convenient
Dynamic pages never become idle
Analytics, polling, and WebSockets can keep network activity alive. Replace a global network-idle wait with a page-specific selector or application-ready flag, and retain a maximum timeout so failed pages terminate.
Chrome will not start in a container or CI runner
Verify that the Chrome binary exists, the user has a writable profile directory, and the runner has the libraries required by Chrome. Use a unique --user-data-dir for parallel jobs. Do not reuse one profile concurrently. Capture Chrome’s stderr and exit code; a startup failure should be reported as an infrastructure error, not as a successful screenshot.
Remote debugging is inaccessible
Port 0 selects an ephemeral port. Read Chrome’s startup output and connect to the printed port from the same network namespace. In containers, bind and expose the port deliberately; do not expose an unauthenticated DevTools endpoint to an untrusted network.
Performance, reliability, and operating cost
Launching a fresh browser for every image is simple but adds startup overhead. A long-running browser with isolated pages can improve throughput, provided you close pages, bound navigation time, and recycle the browser periodically to control memory growth. Parallelize cautiously: each page consumes CPU and memory, and too many simultaneous captures can make timing less deterministic.
Use a readiness condition instead of an unnecessarily large sleep. Cache immutable assets where appropriate, but remember that a cached page can conceal a deployment problem. Record the URL, viewport, Chrome version, wait condition, elapsed time, exit status, and output checksum so a failed visual comparison can be reproduced.
Chrome itself has no per-screenshot service charge when you run it locally; your costs are compute, storage, bandwidth, and engineering time. A managed API can be preferable when you need consistent infrastructure, consent handling, retries, usage accounting, or access from environments where Chrome cannot be installed.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Or skip the browser setup
ScreenshotNeo is a website screenshot API and MCP server. A single GET request returns PNG, JPEG, WebP, or PDF:
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
Best Value
- 【INTEGRATED SPEAKERS】Whether you're at work or in the midst of an intense gaming session, our built-in speakers provide rich and seamless audio, all while keeping your desk clutter-free.
- 【EASY ON THE EYES】 Protect your eyes and enhance your comfort with Blue-Light Shift technology. This feature reduces harmful blue light emissions from your screen, helping to alleviate eye strain during long hours of use and promoting healthier viewing habits.
- 【WIDEN YOUR PERSPECTIVE】Our sleek minimal bezel design ensures undivided attention. The nearly bezel-free display seamlessly connects in a dual monitor arrangement, delivering an unobstructed view that lets you focus on more at once, completely distraction-free.
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 all request options and response details. The equivalent Python request is:
import requests
r = requests.get("https://api.screenshotneo.com/v1/shot", params={"access_key": "YOUR_API_KEY", "url": "https://stripe.com"}, timeout=90)
open("shot.webp", "wb").write(r.content)
Node.js:
const q = new URLSearchParams({ access_key: 'YOUR_API_KEY', url: 'https://stripe.com' });
const res = await fetch(`https://api.screenshotneo.com/v1/shot?${q}`);
- Cookie banners, newsletter popups, and chat widgets are removed before the shot; each cleanup step can be disabled.
- Bot checks or CAPTCHAs, blank pages, timeouts, failed loads, and cache hits are not billed. Response headers identify the page verdict and billing status.
- An MCP server provides
take_screenshot,get_page_info, andcapture_pdftools for Claude, Cursor, and other MCP clients. - The Free plan includes 1,000 screenshots per month with no card. Paid plans start at $5 for 3,000 shots; every feature is available on every plan.
Create a free ScreenshotNeo account to start with 1,000 screenshots a month and no card.
ScreenshotNeo capabilities worth mapping from a local script
If your local Puppeteer job needs more than a basic page image, ScreenshotNeo exposes options for full-page capture with lazy images loaded, CSS-selector element capture, dark mode, 12 device presets or a custom viewport, retina scale, PDF paper size and page ranges, HTML/CSS rendering, custom JavaScript and CSS, pre-capture clicks, hidden selectors, selector or network-idle waits, ad/tracker/request blocking, custom headers, cookies, user agents and Authorization, timezone and geolocation, transparent backgrounds, resizing, user-selected cache TTLs, signed image links, asynchronous jobs with signed webhooks, bulk capture of up to 100 URLs per call, a usage API, and an OpenAPI specification. Parameter names used by other screenshot APIs also work, which can simplify migration.
Frequently Asked Questions
Does Chrome Headless capture a PDF instead of an image?
The --screenshot workflow produces a PNG. Use browser printing or a service designed for PDF output when the deliverable is a paginated document.
Can I inspect a headless page while it is running?
Yes. Launch Chrome with --remote-debugging-port=0, then connect to the printed endpoint through chrome://inspect from another Chrome instance.
When should I use the old Headless shell?
Only when a legacy dependency explicitly requires it. For new automation, use unified Headless Chrome; the old implementation is a separate chrome-headless-shell binary from Chrome 132.0.6793.0 onward.
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.

