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.

Use Chrome DevTools Protocol’s Page.captureScreenshot method. It returns a base64-encoded image, so your client must decode the data field and write the bytes to a file. You can send the method through DevTools Protocol Monitor or through a CDP WebSocket connection opened by your automation code.

This guide shows both workflows, explains every capture option, and covers viewport, clipped-region, device-emulation, and full-page captures. The protocol reference is tip-of-tree, so check the definition and behavior shipped with the Chrome build you target before relying on experimental fields.

What you need before sending a screenshot command

  • A running Chrome or Chromium instance with remote debugging enabled, or Chrome DevTools opened on the page you want to inspect.
  • A CDP client connection to the target page. CDP methods are protocol messages, not shell commands.
  • A way to decode base64 and save binary output when you are not using Protocol Monitor.

For a locally launched browser, a typical debugging start command is:

google-chrome --remote-debugging-port=9222

Use the executable and profile arrangement appropriate for your operating system. Exposing a debugging port can grant control over browser tabs, cookies, and logged-in sessions; bind it to localhost and do not expose it to an untrusted network.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
#1 Best Overall
Audio Express AXHDCAP 4K HDMI Video Capture Card, Cam Link Card Game Audio Adapter HDMI to USB 2.0 Record Capture Device for Streaming, Live Broadcasting, Video Conference, Teaching, Gaming
  • [Enhanced 4K-1080P Video Capture Experience] Capture the Magic: Elevate your video recordings to new heights with our upgraded anti-static 1080P Video Capture Card. Immerse yourself in stunning visuals, supporting HDMI input at 4K 60FPS and USB output for capturing in 1080P, complete with rich stereo sound. Enjoy crystal-clear video recordings, dynamic gaming live streams, and professional conference broadcasts. Note: HDMI resolution: Max input can be 3840×2160@30Hz / Video output resolution: Max output can be 1920×1080@30Hz
  • [Seamless Real-Time Preview] Stay in the Moment: Our advanced ultra-low latency technology ensures seamless real-time transmission of video streams. Experience instant, lag-free previews, allowing you to capture every detail precisely. Effortlessly record video directly to your hard disk, all without compromising on quality or introducing any delays.
  • [Versatility and Broad Compatibility] Your Creative Hub: Connect your DSLR, camcorder, or action camera to a wide range of operating systems, including Windows, MacOS, and Linux. Unlock a world of possibilities with real-time streaming to popular platforms like Twitch, Youtube, OBS, Zoom, Potplayer, and VLC, giving you the tools to share your content effortlessly.
  • [Effortless Plug and Play] Simplicity Redefined: Say goodbye to complex installations. Our plug-and-play design eliminates the need for drivers or external power supplies. Seamlessly integrate high-definition acquisition into various scenarios, whether it's educational recordings, immersive gaming, precise medical imaging, captivating live streams, or professional broadcasting.
  • [Seize Every Detail with Precision] Unleash your creativity and attention to detail with our video capture card. Capture every nuance, every color, and every moment with precision, thanks to the enhanced capabilities of our technology. Whether you're a content creator, a gamer, or a professional, our capture card empowers you to seize the finest elements and bring them to life in your recordings and live streams.

Option 1: Capture with DevTools Protocol Monitor

Protocol Monitor is the easiest way to see the actual CDP request and response without writing a client.

  1. Open Chrome DevTools.
  2. Open DevTools settings, choose Experiments, and enable Protocol Monitor if it is not already available.
  3. Open the Command Menu, search for Protocol monitor, and open it.
  4. Choose the page target you want to control.
  5. Use the command editor to select Page.captureScreenshot and enter parameters such as {"format":"png"}.
  6. Send the command and inspect the response. The data property contains the image as base64 text.

The official DevTools guide also demonstrates sending protocol commands from DevTools itself with Main.MainImpl.sendOverProtocol. That route is useful for experimenting with a command before putting it into an automation script.

Option 2: Send Page.captureScreenshot from code

Every CDP message has an integer identifier, a method name, and optional parameters. The response with the matching identifier contains the result. The central request is:

{"id":1,"method":"Page.captureScreenshot","params":{"format":"png"}}

Enable the Page domain when your client workflow requires it:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
{"id":2,"method":"Page.enable"}

Then decode result.data. The protocol specifies the encoding, but not your language’s file-writing API.

Python example using a CDP WebSocket

Install a WebSocket client first:

python -m pip install websocket-client requests

The following script discovers the first page target, connects to its WebSocket endpoint, enables the Page domain, captures a PNG, and writes it to disk.

Rank #2
Capture Card, 4K HDMI Video Capture Card, Game Capture Card, 1080P 60FPS Video Capture Device, HDMI to USB 3.0 Capture Card for Streaming, Work with Camera/Xbox/PS4/PS5/PC/OBS
  • 【1080P HD High Quality】Capture resolution up to 1080p for video source and it is ideal for all HDMI devices such as PS4, PS3, Xbox One, Xbox 360, Wii U, DVDs, DSLR, Camera, Security Camera and set top box. Note: Video input supports 4K30/60Hz and 1080p120/144Hz. Does not support 4K120Hz/144Hz. Output supports up to 2K30Hz.
  • 【Plug and Play】No driver or external power supply required, true PnP. Once plugged in, the device is identified automatically as a webcam. Detect input and adjust output automatically. Won't occupy CPU, optional audio capture. No freeze with correct setting.
  • 【Compatible with Multiple Systems】suitable for Windows and Mac OS. High speed USB 3.0 technology and superior low latency technology makes it easier for you to transmit live streaming to Twitch, Youtube, Facebook, Twitter, OBS, Potplayer and VLC.
  • 【HDMI LOOP-OUT】Based on the high-speed USB 3.0 technology, it can capture one single channel HD HDMI video signal. There is no delay when you are playing game live.
  • 【Support Mic-in for Commentary】Rybozen capture card has microphone input and you can use it to add external commentary when playing a game. Please note: it only accepts 3.5mm TRS standard microphone headset.
import base64
import json
import requests
import websocket

TARGETS = "http://127.0.0.1:9222/json"
target = next(t for t in requests.get(TARGETS, timeout=10).json()
              if t.get("type") == "page")

ws = websocket.create_connection(target["webSocketDebuggerUrl"], timeout=30)

def call(message_id, method, params=None):
    payload = {"id": message_id, "method": method}
    if params is not None:
        payload["params"] = params
    ws.send(json.dumps(payload))
    while True:
        response = json.loads(ws.recv())
        if response.get("id") == message_id:
            if "error" in response:
                raise RuntimeError(response["error"])
            return response["result"]

call(1, "Page.enable")
result = call(2, "Page.captureScreenshot", {"format": "png"})
with open("page.png", "wb") as image:
    image.write(base64.b64decode(result["data"]))
ws.close()
print("Wrote page.png")

In production, match responses by id because CDP can emit asynchronous events between your request and its response. Add navigation and readiness checks before capture when the page is dynamic.

Node.js example using the Chrome DevTools Protocol directly

This example uses Node’s built-in HTTP and WebSocket support only if your Node version provides a WebSocket implementation. Otherwise install a compatible WebSocket package and import it as required by that package.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
const http = require('node:http');
const fs = require('node:fs');

function getJson(url) {
  return new Promise((resolve, reject) => {
    http.get(url, res => {
      let body = '';
      res.on('data', chunk => body += chunk);
      res.on('end', () => resolve(JSON.parse(body)));
    }).on('error', reject);
  });
}

(async () => {
  const targets = await getJson('http://127.0.0.1:9222/json');
  const page = targets.find(t => t.type === 'page');
  if (!page) throw new Error('No page target found');

  const ws = new WebSocket(page.webSocketDebuggerUrl);
  await new Promise((resolve, reject) => {
    ws.addEventListener('open', resolve, { once: true });
    ws.addEventListener('error', reject, { once: true });
  });

  let nextId = 1;
  function call(method, params) {
    const id = nextId++;
    return new Promise((resolve, reject) => {
      function onMessage(event) {
        const message = JSON.parse(event.data);
        if (message.id !== id) return;
        ws.removeEventListener('message', onMessage);
        if (message.error) reject(new Error(JSON.stringify(message.error)));
        else resolve(message.result);
      }
      ws.addEventListener('message', onMessage);
      ws.send(JSON.stringify({ id, method, params }));
    });
  }

  await call('Page.enable');
  const result = await call('Page.captureScreenshot', { format: 'png' });
  fs.writeFileSync('page.png', Buffer.from(result.data, 'base64'));
  ws.close();
})();

Capture formats and compression

PNG

PNG is the documented default and preserves lossless image data. Use it for text, diagrams, UI regression checks, or further image processing.

JPEG

Set format to jpeg. The documented quality integer range is 0–100 and applies to JPEG encoding; it is not a PNG quality control.

{"id":1,"method":"Page.captureScreenshot","params":{"format":"jpeg","quality":80}}

WebP

Set format to webp when your consumers support it. Choose the format based on compatibility and file-size requirements rather than assuming one format is always smaller.

Faster encoding

optimizeForSpeed:true requests faster encoding at the cost of a larger resulting image. Its documented default is false.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #3
Guermok Video Capture Card, 4K USB3.0 HDMI to USB C, 1080P 60FPS & 2K 30FPS
  • 【1080P 60FPS Video Capture Card】 This HDMI game capture card is based on USB3.0 high speed transmission port, input resolution up to 4K@30HZ, output resolution up to 2K@30Hz or 1920×1080@60Hz. Type c and USB interface can meet most of the devices in daily life. Easily meet the online capture, real-time recording, online meetings, live gaming and other functions, so you have a better visual enjoyment. Note: For capture use only; requires capture software to function and is not intended for direct screen casting to a monitor or TV
  • 【Ultra Low Latency Screen Sharing】 HDMI capture card is made of good quality aluminum alloy with strong heat dissipation, allowing you to enjoy ultra low latency while live gaming or video recording or live streaming, avoiding blue screens and lag. This HDMI to USBC capture card supports easy recording of good quality audio or HD video and transferring it to your computer or streaming platform, allowing you to record 60 fps HD video directly on your hard drive and real-time preview
  • 【Plug and Play, Easy to Carry】 This HDMI 1080P video capture card does not require any additional drivers or external power supply, just plug and play for fast capture. The capture card is small and lightweight, so you can put it in your bag for emergencies, making it very portable for outdoor live streaming. It's also a great way to share content in game recording, video conference, video recorder and online teaching
  • 【Wide Compatibility USB Capture Card】 Easily streams to Facebook, Youtube or Twitch. With the connection, this HDMI to USB C/3.0 video capture devices can be working on several Operating Systems and various software: Windows 7/ 8/ 10, Mac OS or above, Linux, Android, Laptop, Xbox One, PS3/PS4/PS5, Camera, DVDs, Set Top Box, Webcame, DSLR, Switch/Switch 2, TV BOX, HDTV, Potplayer/VLC, ZOOM, OBS Studio etc.
  • 【Package Content & Note】 1x HD Audio Capture Card , 1x USB 3.0 to USB C Adapter (A-side 3.0, B-side 2.0), 1x user manual. Please note that you need to restart the OBS Studio software after the audio setup is complete, otherwise it will result in no sound output. When using an adapter, if the device is recognized as USB 2.0, try using the other side with the USB-C port. Simply flip the capture card and reconnect it to be recognized as USB 3.0

Capture a viewport, region, or full page

Default viewport screenshot

With no clip and no beyond-viewport request, capture the visible page area using the current browser metrics:

{"id":1,"method":"Page.captureScreenshot","params":{"format":"png"}}

Capture a rectangular region with clip

Pass a clip object containing x, y, width, height, and scale. These coordinates and dimensions are in device-independent pixels.

{"id":1,"method":"Page.captureScreenshot","params":{"format":"png","clip":{"x":100,"y":200,"width":800,"height":600,"scale":1}}}

Keep the rectangle inside the rendered content you intend to capture. A non-unit scale changes the output pixel dimensions without changing the CSS-coordinate rectangle.

Capture beyond the viewport

Set captureBeyondViewport:true to request content outside the current viewport:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
{"id":1,"method":"Page.captureScreenshot","params":{"format":"png","captureBeyondViewport":true}}

The tip-of-tree reference documents this field with a default of false and marks it experimental. Full-page output can use the page’s actual content size rather than the nominal viewport dimensions, so inspect the resulting image dimensions instead of assuming a fixed height. Support and behavior can differ between Chrome versions.

Surface capture

fromSurface controls whether the image is captured from the surface rather than the view. Its documented default is true. Do not assume identical output across every emulation or platform configuration.

Rank #4
Video Capture Card, 4K USB3.0 HDMI to USB C, 1080P60FPS HDMI Capture Card for Streaming, Gaming, Video Recording Compatible with Switch, Xbox, PS4/5, OBS,iPad Mac OS Windows,Camera, Zoom(Silver)
  • 【4K HDMI Input, 2K@30Hz Recording】Powered by a true USB 3.0 high-speed interface, the capture card supports up to 4K@30Hz HDMI input and records at 2K@30Hz or 1080P@60Hz. Perfect for gamers, streamers, and professionals who need crisp, smooth video for live streaming, gameplay recording, or online meetings.
  • 【Ultra Low Latency Screen Sharing】Built with a premium aluminum alloy shell and advanced chipset for stable heat dissipation, ensuring ultra-low latency transmission. Capture high-quality video and dual-channel audio in real time—no lag, no frame drop—ideal for Twitch, YouTube, or OBS streaming.
  • 【Easy Plug and Play, Compact & Portable】No driver or external power required—just plug and play via USB 3.0 or Type-C connection to your Windows or macOS computer. Lightweight and compact design makes it easy to carry for outdoor streaming, live shows, or mobile recording setups.
  • 【Wide Compatibility & Multi-Device Support】Compatible with Windows 7 8 10 11, macOS, Linux,Android and supports most popular software such as OBS, Zoom, VLC, Twitch Studio, and more. Works seamlessly with PS4, PS5, Xbox, Switch, DSLR cameras, TV boxes, and other HDMI-output devices for streaming to YouTube, Twitch, etc.
  • 【What You Get】Includes: HDMI Capture Card, USB 3.0 to USB-C Adapter, User Manual. Tips: Make sure your tablet’s OTG function is enabled before connecting. Test your HDMI device with a monitor first to confirm video and audio output, then connect to the Video Capture Card for recording.

Set viewport and device metrics before capture

Screenshot pixels reflect the page’s current layout and device metrics. For a mobile-style capture, send Emulation.setDeviceMetricsOverride first, then capture:

{"id":3,"method":"Emulation.setDeviceMetricsOverride","params":{"mobile":true,"width":390,"height":844,"deviceScaleFactor":3}}
{"id":4,"method":"Page.captureScreenshot","params":{"format":"png"}}

The official DevTools example uses mobile, width, height, and deviceScaleFactor. Those values are an example configuration, not a universal device preset. Clear the override after your test if the same target will be reused:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
{"id":5,"method":"Emulation.clearDeviceMetricsOverride"}

Set the viewport before navigation when responsive breakpoints, lazy loading, or layout scripts depend on the initial size.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Make captures reliable on real pages

Wait for navigation and rendering

A successful protocol response does not prove that fonts, images, client-rendered components, or data requests have finished. Wait for a navigation lifecycle event, a known DOM condition, or an application-specific readiness signal before calling Page.captureScreenshot.

Handle lazy content

Full-page capture may not trigger every site’s lazy-loading strategy. Scroll or use page JavaScript to reveal required content, then wait for images and layout to settle. Verify the resulting dimensions and inspect the image rather than treating a completed command as proof of completeness.

Control animations

Animations and blinking carets can make repeated captures differ. Inject CSS or application state that disables transitions where your test permits it, and capture at a deterministic point in time.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Best Value
Capture Card 4K HDMI Video Streaming to USB 3.0 1080P 60FPS Capture Device
  • High-Quality Video Capture, 4K HDMI Capture Card Ready: Capture smooth and vibrant video with this 4K HDMI capture card, engineered for gamers and content creators who demand crisp 1080P 60FPS video quality. Whether you're streaming to Twitch or recording gameplay for YouTube, your footage will look professional and detailed
  • Plug-and-Play USB Capture Card, No Drivers Needed: Designed as a USB capture card for streaming, this device works instantly out of the box, just plug into your PC or laptop and start capturing. Fully compatible with popular software like OBS Studio, Streamlabs, and XSplit, making setup quick and stress-free for beginners and pros alike
  • Universal Compatibility PS5, Xbox, Switch & More: Stream or record gameplay from virtually any HDMI-enabled device including Nintendo Switch, PS5, Xbox Series X, DSLR cameras, and PCs. The video capture card for gaming supports seamless passthrough so you can play without lag while your audience watches every frame in real time
  • Low-Latency Performance for Smooth Streaming: This capture card for streaming minimizes delay between gameplay and broadcast, so you get reliable, low-latency capture that works well for competitive gaming, live broadcasts, and podcast sessions. Suitable for those building their channel with high-quality, engaging content
  • Compact & Portable Design for Content Creators: Lightweight and portable, this USB 3.0 capture card works well for creators who travel or switch gaming setups often. Throw it in your bag and stream or record wherever you are, at home, events, LAN parties, streaming or studio sessions

Use the correct target

The /json endpoint can return tabs, extensions, workers, and other targets. Select the page target whose URL and type match your intended document; connecting to a worker does not provide the page screenshot domain you expect.

Common errors and fixes

Symptom Likely cause Fix
Connection refused on port 9222 Chrome was not started with remote debugging, or the port is different. Launch the intended Chrome binary with a localhost debugging port and verify the /json endpoint.
No page target found The target list contains only workers, extensions, or a blank browser session. Open the page, select an entry with type equal to page, and confirm its WebSocket URL.
“Method not found” The connected target is not a page, or the Chrome build does not expose the method as expected. Reconnect to a page target and check the protocol definition bundled with that Chrome version.
Image is blank or incomplete Capture occurred before navigation, client rendering, fonts, or lazy resources completed. Wait for a deterministic readiness condition, allow resources to settle, and capture again.
JPEG quality rejected quality was supplied with PNG or outside 0–100. Use quality only with JPEG and keep it in the documented 0–100 range.
Full-page height is unexpected Actual content size differs from the nominal viewport, or the experimental field behaves differently in that Chrome build. Inspect output dimensions, verify layout and lazy loading, and test against the target Chrome version.
Decoded file cannot be opened The base64 text was written directly instead of decoded. Base64-decode result.data and write binary bytes.
Responses appear out of order CDP events and responses share the same WebSocket. Route messages by their numeric id and handle event messages separately.

Performance, output size, and compatibility

  • PNG preserves detail but can be large; JPEG quality trades fidelity for size; WebP is another supported output choice.
  • optimizeForSpeed can reduce encoding latency while increasing output size.
  • Large full-page images consume memory in Chrome and in your client while base64 is in transit. Stream or process jobs one at a time when pages are very tall.
  • Use clipping when you need one component rather than an entire document.
  • Experimental parameters and implementation details can vary by Chrome release. Pin or record the browser version in automated tests and verify behavior after upgrades.

Or skip the browser setup

ScreenshotNeo provides a website screenshot API when you need a clean image without managing Chrome, targets, WebSockets, or base64 decoding. Its endpoint accepts a URL and returns PNG, JPEG, WebP, or PDF. Before capture it accepts cookie or consent banners and removes more than 60 known consent platforms, newsletter popups, and chat widgets; each cleanup step can be turned off.

Only clean shots are billed. Bot checks or CAPTCHAs, blank pages, timeouts, failed loads, and cache hits cost nothing, and each response identifies the result with X-Page-Verdict and X-Billed headers. ScreenshotNeo also offers an MCP server with take_screenshot, get_page_info, and capture_pdf tools for Claude, Cursor, and other MCP clients.

One-call cURL example (see the ScreenshotNeo documentation for all options):

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
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}`);

Every plan includes the full feature set: full-page and selector captures, dark mode, device presets or custom viewports, retina scale, PDF controls, custom CSS and JavaScript, clicks, waits, request blocking, headers, cookies, user agents, authorization, timezone, geolocation, transparent backgrounds, resizing, selectable-TTL caching, signed links, asynchronous webhooks, bulk capture of up to 100 URLs per call, usage reporting, and an OpenAPI specification. The free plan includes 1,000 screenshots per month with no card; paid plans start at $5 for 3,000. Create a free ScreenshotNeo account.

FAQ

Does Page.captureScreenshot return an image file?

No. It returns base64-encoded image data in the response’s data field. Your client writes the decoded bytes to a file or sends them elsewhere.

Can I use CDP screenshots for a PDF?

Page.captureScreenshot produces an image. For a paginated document, use the separate CDP print-to-PDF workflow or a service that exposes PDF capture.

Are CDP parameters identical in every Chrome release?

No. The tip-of-tree protocol reference can include experimental fields whose availability and behavior differ by browser version. Check the protocol definition for the Chrome build you run.

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

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.