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.

Some links on this page are affiliate links: if you buy through them we may earn a commission, at no extra cost to you.

captureBeyondViewport is an optional Boolean parameter of Chrome DevTools Protocol’s Page.captureScreenshot method. It asks the browser to capture content beyond the visible viewport; its documented default is false. In Chromium, setting it to true can activate a full-page capture path, but only under specific conditions—not as a universal promise of every CDP implementation or browser build.

What the parameter means

The Chrome DevTools Protocol (CDP) Page reference describes captureBeyondViewport as: “Capture the screenshot beyond the viewport. Defaults to false.” The setting is a Boolean switch on Page.captureScreenshot; it is not a width or height, and it does not mean “resize the browser window to the page.” It controls whether capture may extend outside the currently visible viewport.

With the default value, false, the request does not ask for beyond-viewport capture. Set the value to true when you need the screenshot operation to include content outside the viewport. Exactly how that request is carried out depends on the browser’s implementation and on the other parameters in the capture request.

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

The protocol describes the parameter as experimental in the cited Chromium protocol definition. Protocol references can be rolling documents, while implementation details are tied to specific source revisions. Check the protocol support in the browser build you actually deploy rather than assuming the current reference page and an older or different browser build behave identically.

Does it mean “take a full-page screenshot”?

Not by itself as a cross-browser guarantee. The parameter’s documented meaning is broader and more cautious: capture beyond the viewport. In the cited Chromium PageHandler implementation, it participates in a full-page path when all of these conditions hold:

  • fromSurface is true. In that implementation, this parameter defaults to true.
  • captureBeyondViewport is true. Its default is false.
  • The caller did not initially provide a clip.

When those conditions are met, that Chromium implementation asks the main frame for full-page dimensions, constructs a clip starting at x=0 and y=0 with a scale of 1, and captures using beyond-viewport behavior. This explains why the flag can produce a full-page screenshot in that implementation. It should not be generalized into a guarantee that every CDP implementation, every browser version, or every combination of parameters will automatically capture the entire document.

There is an additional version caveat: the cited implementation checks the full-page dimensions and returns an error if either dimension is at least 128 × 1024 pixels. This is a guard in that particular Chromium revision’s full-page path, not a portable CDP size limit. Do not build a cross-version maximum around it.

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

What happens when you provide clip?

clip specifies a region to capture. It is a way to request a particular rectangle rather than ask Chromium’s cited implementation to measure the whole page for its full-page branch.

In that implementation, the full-page branch is selected only when no clip was initially supplied. Chromium then creates its own clip after obtaining the page dimensions. Therefore, do not assume that captureBeyondViewport: true overrides a caller-supplied clip or converts a clipped capture into a full-page capture. If you need a region, specify the clip deliberately; if you want Chromium’s cited full-page behavior, omit the caller-supplied clip and verify the other conditions in your target build.

Example request parameters

At the protocol level, the relevant part of a Page.captureScreenshot request can be represented as a JSON parameter object:

{
  "captureBeyondViewport": true
}

This shows the option’s shape, not a complete transport command: CDP clients send method calls through a browser debugging connection, and the exact framing and setup depend on the client you use. A request with the default behavior can omit the field or provide false:

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.
{
  "captureBeyondViewport": false
}

To request a specific region, a client can pass a clip object to the same method. The protocol reference defines the clip as a requested region; the cited Chromium implementation’s full-page path requires that the caller did not provide one. Choose one intent—an explicit region or Chromium’s measured full-page path—and confirm the target browser’s behavior rather than relying on the flag to reconcile them.

Screenshot output settings are separate

captureBeyondViewport controls capture extent, not image encoding. The Page reference lists png, jpeg, and webp as supported formats, with PNG as the default. It also documents quality as an integer from 0 to 100 for JPEG. These options answer a different question: what image format to return and, for JPEG, what quality value to use.

The method returns a data field containing base64-encoded image data. A client must decode that data if it needs image bytes in a file or another binary destination. Do not confuse the base64 representation in the protocol response with the image’s format or with whether the capture extends beyond the viewport.

How to decide which capture behavior to request

  • Visible area only: leave captureBeyondViewport false or omit it when the default is what you want.
  • Potentially beyond the visible area: set it true, and check how the browser build handles the rest of the request.
  • A specific rectangle: supply a clip for that region. Do not count on the cited Chromium full-page branch when a clip is already supplied.
  • A full-page capture in Chromium: the cited implementation’s path requires fromSurface true, the flag true, and no caller-supplied clip. Verify this against the actual deployed browser version.
  • A different browser or CDP-compatible implementation: treat the field’s documented meaning as a request to capture beyond the viewport, not proof of identical full-page logic.

This distinction is useful when diagnosing a screenshot that stops at the viewport boundary. First inspect the value actually sent for captureBeyondViewport; then check whether the request includes a clip, whether the capture is from the surface, and whether the target browser supports the parameter as expected. If the goal is a full document image, confirming only that the flag is true is not enough for the cited Chromium behavior.

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

Version and compatibility considerations

The protocol field is marked experimental in the cited Chromium definition, and the full-page conditions described above come from a separate pinned Chromium implementation revision. Those are evidence about the cited definitions and code, not a promise that behavior never changes. A historical DevTools Frontend change from November 2020 also used captureBeyondViewport: true for node screenshots; that demonstrates past usage, not present-day compatibility across browser versions.

For a stable automation setup, record the browser build you run and test the exact combination of parameters against it. If the parameter is rejected, ignored, or produces a result different from the one you expect, compare the build’s protocol definition and implementation rather than inferring support from a rolling “tot” reference alone.

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

Troubleshooting unexpected results

The capture ends at the viewport

  • Check that the request actually sets captureBeyondViewport to true; the default is false.
  • If using the cited Chromium full-page path, check that fromSurface is true and that no caller-supplied clip is present.
  • Confirm that your browser build supports the parameter and follows the behavior you expect.

The capture contains only a clipped region

Inspect the request for clip. The cited Chromium full-page branch is conditional on the caller not having supplied one. If the clip is intentional, treat the result as a regional capture rather than expecting the full-page branch to override it.

The browser rejects or ignores the parameter

The cited protocol definition labels the field experimental. Check the target build’s protocol definition and test against that build; do not assume a rolling protocol reference establishes support in every deployed version or CDP implementation.

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

The image is returned as text instead of a file

The method’s response contains base64-encoded data. Decode the data value before writing or passing it as raw image bytes. Separately choose the desired format—PNG, JPEG, or WebP—using the output-format option documented by the Page reference.

A very tall or wide capture fails

The cited Chromium revision has a dimension check in its full-page path that errors when either dimension is at least 128 × 1024 pixels. Treat that as a revision-specific implementation guard. Check the error and the exact browser version; the available evidence does not establish a universal CDP limit or a universal workaround.

Or skip the browser setup

If you need a screenshot from a URL without setting up a CDP connection, ScreenshotNeo offers a website screenshot API and MCP server. It is a separate service, not a CDP parameter, so it does not expose captureBeyondViewport as the same protocol switch. One GET request can return an image or PDF; see the ScreenshotNeo API documentation for request options.

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

ScreenshotNeo accepts cookie or consent banners and removes more than 60 known consent platforms, newsletter popups, and chat widgets before capture; each cleanup step can be turned off. Bot checks, blank pages, timeouts, failed loads, and cache hits cost nothing, and response headers report the page verdict and billing status. Its MCP server provides take_screenshot, get_page_info, and capture_pdf tools for AI agents and MCP clients. The Free plan includes 1,000 screenshots per month without a card; paid plans start at $5 for 3,000 shots.

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

Sign up for ScreenshotNeo’s free plan to try 1,000 screenshots a month with no card.

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.