Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Launch Chrome with both switches on the same command: chrome --headless --incognito https://example.com. Replace chrome with the executable installed on your system, such as google-chrome. The --headless switch runs Chrome without a visible user interface; --incognito starts the process in an Incognito browsing context.

Use the command for your operating system

The exact executable and shell syntax differ by platform. These commands follow Chrome’s documented Headless launch forms, with --incognito added to the same invocation.

Platform Command Notes
Linux
google-chrome --headless --incognito https://example.com
The binary may instead be named chrome, chromium, or another installed package.
macOS
open -a "Google Chrome" --args --headless --incognito https://example.com
open passes the switches to the named application.
Windows Command Prompt
start chrome --headless --incognito https://example.com
Run this in Command Prompt with Chrome available on the system path, or replace chrome with its full executable path.

For a shell script or CI job, use an absolute path when several Chrome or Chromium installations might exist. Add a quoted URL if it contains shell metacharacters or spaces.

Choosing the current Headless implementation

Chrome 112 introduced the newer Headless implementation and the explicit selector is --headless=new. Current Chrome uses the unified Headless implementation when you specify --headless, so this is the usual command:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
#1 Best Overall
Sale
Philips 24 Inch Computer Monitor FHD 100Hz VA VESA Flicker-Free, 241V8LB
  • 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
google-chrome --headless --incognito https://example.com

Use the explicit form when an automation framework, container image, or pinned test environment requires it:

google-chrome --headless=new --incognito https://example.com

Do not build new scripts around --headless=old. Chromium’s current Headless documentation says that, from milestone 132, the old Headless shell is no longer part of the Chrome binary. Environments that still require that implementation must use the separate chrome-headless-shell binary instead. Check the version of the executable you are actually invoking before changing a production job:

google-chrome --version

What Incognito does in a Headless process

--incognito causes Chrome to launch directly in an Incognito browsing context. It does not turn Headless Chrome into an anonymity service, conceal requests from the sites you visit, or create a security boundary. Treat it as a browser-context choice, not a network-privacy guarantee.

Headless and Incognito solve different problems:

  • Headless removes the visible interface so a command can run unattended.
  • Incognito selects a private browsing context inside that Chrome process.

Combining them is useful for one-off captures, automated checks, and scripts that should not open a normal interactive window. If you need a deliberately persistent browser profile, configure that separately with the profile options supported by your automation setup; Incognito itself should not be treated as a durable profile store.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Run unattended tasks from the command line

After Chrome starts, you can ask Headless mode to produce output instead of merely loading a page. These operations are independent: choose the one that matches the artifact you need.

Rank #2
Philips 22 Inch Computer Monitor FHD 100Hz VA VESA Flicker-Free, 221V8LB
  • 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

Dump the rendered DOM

--dump-dom serializes the page’s DOM after scripts have run and writes it to standard output:

google-chrome --headless --incognito --dump-dom https://example.com > page.html

The output is the DOM Chrome produced after loading and script execution, not necessarily the original response body.

Capture a screenshot

--screenshot saves an image. Set the viewport with --window-size so captures are repeatable:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
google-chrome --headless --incognito --window-size=1365,768 --screenshot=home.png https://example.com

If you omit a filename, Chrome uses its default screenshot filename in the current working directory. Ensure the destination directory is writable in a container or CI runner.

Print a PDF

--print-to-pdf writes a PDF. Add --no-pdf-header-footer when you do not want print headers and footers:

Rank #3
Sale
Dell 24 Monitor - SE2426H - 23.8-inch FHD (1920x1080) 144Hz 1ms Display, in-Plane Switching (IPS) Technology, AMD FreeSync™, TÜV 3-Star 2X HDMI, Tilt
  • 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.
google-chrome --headless --incognito --print-to-pdf=page.pdf --no-pdf-header-footer https://example.com

Limit waiting time

--timeout=<milliseconds> limits how long a capture command waits for loading. For pages whose timers or animations make output nondeterministic, --virtual-time-budget=<milliseconds> advances page timers for a bounded period before Chrome captures the result:

google-chrome --headless --incognito --timeout=30000 --virtual-time-budget=5000 --screenshot=stable.png https://example.com

These are separate controls: the timeout bounds waiting, while the virtual-time budget gives scripts and timers a defined amount of virtual time.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Open Chrome-internal URLs

Chrome blocks chrome:// URLs in some Headless command-line workflows. The --allow-chrome-scheme-url switch enables them and is available from Chrome 123:

google-chrome --headless --incognito --allow-chrome-scheme-url --dump-dom chrome://version

Inspect an invisible instance with DevTools

When a command succeeds but the result is wrong, expose the DevTools Protocol and inspect the running instance. Port 0 asks Chrome to choose a free port and print a unique WebSocket endpoint:

google-chrome --headless --incognito --remote-debugging-port=0 https://example.com

From another Chrome instance, open chrome://inspect and connect to the endpoint shown by the Headless process. This lets you inspect pages that have no visible window while preserving the same launch flags.

Rank #4
Sale
Samsung 27" Essential S3 (S36GD) Series FHD 1800R Curved Computer Monitor
  • 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

For repeatable diagnostics, record the Chrome version, complete command, target URL, exit status, and any stderr output. Do not expose a debugging endpoint beyond the local machine unless your environment supplies its own access controls.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Troubleshooting common failures

Symptom Likely cause Fix
command not found or “’chrome’ is not recognized” The executable is not on PATH, or the package uses another name. Run the installed binary by absolute path, or use the platform-specific name such as google-chrome. Verify with its --version command.
A window appears instead of a fully unattended run The command was launched without --headless, or a wrapper discarded the argument. Print the final argument list from the wrapper and ensure --headless and --incognito are both passed to Chrome.
Chrome rejects --headless=old Newer Chrome versions no longer include the old implementation in the main binary. Use --headless or --headless=new. If old Headless behavior is mandatory, install the separate chrome-headless-shell binary.
The screenshot or PDF is blank The page did not finish loading, the command timed out, or the destination cannot be written. Increase --timeout, set a suitable --virtual-time-budget, check stderr and the exit code, and test writing a file in the destination directory.
Dynamic content is missing Capture occurred before scripts or timers produced the content. Use a longer virtual-time budget, then inspect with --dump-dom or the DevTools Protocol to see what actually rendered.
chrome:// target fails Chrome-internal schemes are not enabled for that invocation. Add --allow-chrome-scheme-url on Chrome 123 or newer.
Remote debugging cannot be found The process exited, the chosen port was blocked, or the endpoint was not captured. Use --remote-debugging-port=0, keep the process running, and copy the WebSocket endpoint printed by Chrome before opening chrome://inspect.

Reliability and performance considerations

Pin the executable and version

Automation can change behavior when a system update replaces Chrome. Record the binary path and version in CI logs, and test the same Headless selector (--headless or --headless=new) in development and production.

Make output deterministic

Use a fixed --window-size for screenshots, an explicit output filename, and bounded --timeout and --virtual-time-budget values. These settings make differences easier to attribute when a page, network request, or script changes.

Handle exit status and files

Run commands with shell error handling, verify that the expected PNG or PDF exists, and preserve stderr on failure. A successful process start does not by itself prove that the target rendered correctly.

Choose the right interface

  • Use --dump-dom for a serialized DOM snapshot.
  • Use --screenshot for an image and --window-size for viewport control.
  • Use --print-to-pdf for a document, optionally suppressing headers and footers.
  • Use the DevTools Protocol when you need interactive inspection of an invisible browser.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Or skip the browser setup

ScreenshotNeo provides a website screenshot API and MCP server when you need an image or PDF without maintaining a local Chrome process. Its one-call example is:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Best Value
Sale
Sceptre New 22-Inch Gaming Monitor, FHD 1080p, Up to 144Hz, HDMI, DisplayPort, Built-in Speakers, Machine Black (E225W-FW144 Series, 2026)
  • 【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.

See the API documentation for all parameters and response details.

curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp

Python:

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.
  • Bot checks, blank pages, failed loads, timeouts, and cache hits are not billed; response headers identify the page verdict and billing status.
  • An MCP server provides take_screenshot, get_page_info, and capture_pdf tools for AI agents such as Claude and Cursor.
  • The Free plan includes 1,000 screenshots per month with no card. Paid plans start at $5 for 3,000 shots.

Create a free ScreenshotNeo account to start with the 1,000-shot monthly allowance.

Frequently asked questions

Can I combine Headless Incognito with a URL containing query parameters?

Yes. Quote the complete URL in your shell when characters such as &, spaces, or parentheses could otherwise be interpreted by the shell.

Where does Chrome write a screenshot when no filename is supplied?

It writes the default screenshot file in the command’s current working directory. Set an explicit filename and working directory in automation so downstream steps know exactly where to find it.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Is --headless=new required on every current Chrome installation?

No. The plain --headless switch is the normal current choice. Use the explicit new value when a pinned toolchain requires that spelling.

Frequently Asked Questions

Can I launch several Headless Incognito commands at once?

Yes, provided each process has sufficient system resources and separate output filenames. In a script, isolate logs and artifacts per process so one run cannot overwrite another.

How do I preserve a debugging record for a failed capture?

Save the complete command, Chrome version, exit status, standard error, target URL, and any generated DevTools WebSocket endpoint alongside the failed artifact.

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.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.