Some links on this page are affiliate links: if you buy through them we may earn a commission, at no extra cost to you.
To capture a full page through Chrome DevTools Protocol (CDP), call Page.captureScreenshot with captureBeyondViewport: true and fromSurface: true, and leave clip out of the request. Chromium then captures the page beyond the visible viewport in one operation. The response contains base64-encoded image data; decode it and save it as a file.
The CDP request for a full-page screenshot
Send this command to the WebSocket endpoint for the page target you want to capture:
{
"id": 1,
"method": "Page.captureScreenshot",
"params": {
"format": "png",
"captureBeyondViewport": true,
"fromSurface": true
}
}
A successful response has the shape {"id":1,"result":{"data":"..."}}. The value in result.data is base64-encoded image data, not a file path or raw PNG bytes. Decode it before writing the result to disk.
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 glitchesFor a full-page capture, the important combination is captureBeyondViewport: true, fromSurface: true, and no clip. Chromium’s full-page path asks the renderer for the page size and captures from the top-left at scale 1. Adding a clip instead requests a bounded rectangle, so leave it out when you want the automatic full-page capture.
#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
Run a complete capture with Python
The example below assumes Chrome or Chromium is already running with its remote debugging endpoint available at 127.0.0.1:9222. Install the Python WebSocket client with python -m pip install websocket-client. The script selects the first page target, navigates it, waits for the document’s readyState to become complete, requests the screenshot, decodes the response, and writes full-page.png.
import base64
import json
import time
import urllib.request
import websocket
DEBUG_URL = "http://127.0.0.1:9222/json"
OUTPUT_FILE = "full-page.png"
with urllib.request.urlopen(DEBUG_URL, timeout=10) as response:
targets = json.load(response)
page = next((target for target in targets if target.get("type") == "page"), None)
if page is None:
raise RuntimeError("No page target found. Open a tab in the remote-debugging browser.")
ws = websocket.create_connection(page["webSocketDebuggerUrl"], timeout=30)
next_id = 0
def command(method, params=None):
global next_id
next_id += 1
command_id = next_id
ws.send(json.dumps({"id": command_id, "method": method, "params": params or {}}))
while True:
message = json.loads(ws.recv())
if message.get("id") == command_id:
if "error" in message:
raise RuntimeError(f"CDP error for {method}: {message['error']}")
return message.get("result", {})
try:
command("Page.enable")
command("Runtime.enable")
command("Page.navigate", {"url": "https://example.com"})
deadline = time.monotonic() + 30
while time.monotonic() < deadline:
result = command("Runtime.evaluate", {
"expression": "document.readyState",
"returnByValue": True
})
if result.get("result", {}).get("value") == "complete":
break
time.sleep(0.25)
else:
raise TimeoutError("Document did not reach readyState complete within 30 seconds")
result = command("Page.captureScreenshot", {
"format": "png",
"captureBeyondViewport": True,
"fromSurface": True
})
with open(OUTPUT_FILE, "wb") as image_file:
image_file.write(base64.b64decode(result["data"]))
print(f"Saved {OUTPUT_FILE}")
finally:
ws.close()
Replace https://example.com with the page you need. The readiness check is deliberately basic: readyState reaching complete does not establish that a site’s data, lazy images, fonts, or client-rendered layout have settled. For a reliable capture, replace or supplement it with a site-specific condition, such as a known element becoming visible or an application status marker changing to its ready state.
Starting Chrome with a debugging endpoint
Start a separate Chrome or Chromium process with remote debugging enabled, then run the script. For example, on systems where the executable is named google-chrome:
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
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
google-chrome --remote-debugging-port=9222 --user-data-dir=/tmp/cdp-screenshot-profile
The executable name and command-line setup vary by operating system and installation. Use a dedicated profile for automation instead of exposing a debugging endpoint for a personal browsing session. CDP gives a connected client substantial control over the browser, so keep the endpoint local and do not make it reachable by untrusted users.
Choose the output format and capture settings
| Setting | What it does | When to use it |
|---|---|---|
format |
Accepts png, jpeg, or webp; PNG is the protocol default. |
Use PNG when lossless output matters; choose JPEG or WebP when those formats fit your storage or delivery pipeline. |
quality |
Sets JPEG quality on a scale from 0 to 100. It is ignored for PNG and WebP. | For example, add "quality": 85 when using JPEG. Do not expect this parameter to change PNG or WebP output. |
captureBeyondViewport |
Asks Chromium to capture content outside the viewport. | Set it to true for the automatic full-page path. |
fromSurface |
Selects the surface capture path used by Chromium’s full-page branch; its default is true. | Set it explicitly to true to make the intended behavior clear. |
clip |
Limits capture to a specified rectangle. | Omit it for an automatic full-page capture. Supply a clip when you intentionally want only a region. |
For JPEG, a request can include "format": "jpeg" and "quality": 85. The client should save the decoded bytes with the matching extension; the capture format and the filename suffix need to agree to avoid confusion in later processing.
Wait for the page state you actually need
CDP does not define one universal readiness event that guarantees every page is fully rendered for a screenshot. A page can signal that navigation or loading has completed and still fetch data, render components, load web fonts, or reveal images later. A capture records the rendered state when the command runs; it does not wait for all application work by itself.
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.
- Navigate. Issue
Page.navigatefor the target URL. - Wait for a meaningful condition. Prefer an application-specific DOM marker or known state over a fixed delay where possible. If no such marker is available, use a bounded wait and check the page before capture.
- Account for lazy content. Full-page capture is not defined as a scroll-and-stitch loop. Do not assume that requesting the full page will trigger every site’s scroll-dependent loading behavior.
- Capture only after layout has settled. If content is still changing size, wait for the change to finish or capture a defined region after the page stabilizes.
A short delay can be useful for a known, predictable animation or delayed widget, but it is not a general substitute for a readiness condition. If a page’s height changes between the readiness check and the screenshot command, repeat the check or log the changed state so that intermittent output can be diagnosed.
Handle very tall pages and capture errors
Chromium’s full-page implementation rejects a capture when either image dimension is at least 128 × 1024 pixels (131,072), returning the server error Page is too large. This is an implementation limit, not a recommended page size. The implementation source also mentions a 16K headless-mode concern, but the enforced guard is the 128K-per-dimension check; verify behavior against the Chrome version you deploy, particularly near a boundary.
When the page exceeds the limit
- Reduce the emulated viewport scale or dimensions if they are making the resulting capture unnecessarily large.
- Capture logical page sections with explicit clips, then combine the resulting images in your own application if a single output file is required.
- Check the actual page dimensions and browser version in logs rather than repeatedly retrying an image that will remain over the guard.
Section capture is a different strategy from Chromium’s automatic full-page branch. When you use a clip, specify rectangles deliberately and account for overlap or seams in your own stitching logic. If the page changes between section captures, the combined image can contain inconsistent content.
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
Common symptoms and fixes
| Symptom | Likely cause | What to do |
|---|---|---|
| The image ends at the visible viewport. | captureBeyondViewport is missing or false, or a clip is restricting the capture. |
Set captureBeyondViewport to true, use the surface path, and omit clip for full-page capture. |
The command returns Page is too large. |
At least one image dimension has reached Chromium’s full-page implementation guard. | Reduce scale or size, or capture sections with clips. |
| The screenshot is blank, partial, or shows a loading state. | The wrong target may be selected, the page may not be ready, or rendering may still be in progress. | Confirm the page target and URL, wait for a meaningful site-specific condition, then retry with a bounded timeout. |
| The client cannot connect or stops receiving responses. | The target may be unavailable or the debugging endpoint may not be reachable. | Check that Chrome is running with remote debugging enabled, rediscover the target, and use timeouts so a stalled connection is reported clearly. |
| The output file is corrupt or has the wrong type. | The base64 data may not have been decoded, or the extension may not match the requested format. | Decode result.data and save it using the extension matching the requested format. |
Make captures reproducible and manageable
When screenshots are used for regression checks, documentation, or production workflows, keep a record alongside each capture of the browser version, URL, viewport and emulation settings, output format, and readiness condition. These details make a difference when a page changes or an image differs from an earlier run.
- Use bounded waits. Give navigation, readiness checks, and WebSocket operations timeouts. Log failures with the target and command instead of allowing automation to hang indefinitely.
- Retry selectively. Rediscover an unavailable target and retry transient connection failures, but do not blindly repeat permanent errors such as an oversized page.
- Keep target and state consistent. Capture the intended tab after navigation and readiness checks; avoid sharing a page target with unrelated automation that can navigate or resize it.
- Plan for image size. Tall pages and large raster output take more memory and storage than viewport images. Use an appropriate format and section captures where a full-page image exceeds the browser guard or downstream limits.
The protocol operation itself is a single capture request, not a sequence of viewport screenshots. Performance and output size still depend on the page’s rendered dimensions and chosen format, so measure those in the environment that will run the job rather than assuming one setting fits every site.
Windows 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 reinstallOutdated 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 matchOr skip the browser setup
If you need a screenshot without managing a Chrome process, ScreenshotNeo is a website screenshot API and MCP server for developers. A GET request with a URL returns an image or PDF. One cURL request looks like this; replace the example URL with the page to capture:
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 API documentation for request options. Equivalent Python and Node.js examples:
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)
const q = new URLSearchParams({ access_key: 'YOUR_API_KEY', url: 'https://stripe.com' });
const res = await fetch(`https://api.screenshotneo.com/v1/shot?${q}`);
ScreenshotNeo accepts cookie or consent banners as a visitor and removes more than 60 known consent platforms, newsletter popups, and chat widgets before the shot; each of those steps can be turned off. Bot checks or CAPTCHAs, blank pages, timeouts, failed loads, and cache hits cost nothing, and responses identify the page verdict and billing status in headers. Its MCP server offers take_screenshot, get_page_info, and capture_pdf for AI agents and MCP clients. The free plan includes 1,000 screenshots a month with no card; paid plans start at $5 for 3,000 shots. Sign up for ScreenshotNeo’s free plan to try it without a card.
Frequently Asked Questions
Does CDP’s full-page screenshot scroll the page and stitch separate images?
No. Chromium’s full-page branch captures beyond the viewport in one protocol operation; it is not defined as a scroll-and-stitch loop.
The Tool Desk
Outbyte PC Repair FREEClear out junk files and repair common Windows errorsFree Scan →Outbyte Driver Updater FREEScan for outdated or missing drivers - takes under a minuteDriver Scan →Can I use Chrome Protocol Monitor to send the capture command?
Yes. Chrome Protocol Monitor is one of the clients that can issue CDP methods; send Page.captureScreenshot with the full-page parameters shown above.
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.

