Free tools Windows power users keep installed
One-click scans. No signup required.
Use Puppeteer’s page.screenshot() to capture a browser page, and use elementHandle.screenshot() when you need just one DOM element. Save the result by supplying a file path, or omit path and work with the returned image bytes in memory. Set fullPage: true for a full-page capture.
What Puppeteer’s screenshot API captures
Puppeteer provides two main screenshot methods for rendered web content. Page.screenshot() captures a page; ElementHandle.screenshot() captures a selected element within that page. A page capture can represent the visible viewport, the full page, or a specified rectangular clip. Choose the narrowest scope that matches what you need: it keeps the output focused and makes the capture intent explicit.
- Viewport: Call
page.screenshot()withoutfullPageto capture the page’s current visible area. - Full page: Set
fullPage: trueto include content beyond the initial viewport. - Region: Pass a
cliprectangle to capture a bounded area. - One element: Locate the element and call its
screenshot()method.
These are browser-rendered captures: Puppeteer opens a page, navigates to the target, and captures what the browser renders. This is distinct from downloading an image file already hosted by a site.
Install and take a first screenshot
In a Node.js project, install Puppeteer and create a script such as screenshot.js. The basic flow is to launch a browser, open a page, navigate to the URL, save the image, and close the browser. The example below follows Puppeteer’s documented screenshot workflow and uses networkidle2 as its navigation wait condition.
The Tool Desk
Outbyte Driver Updater FREEFix the driver behind crashes, sound loss and screen glitchesFind Drivers →Outbyte PC Repair FREEClear out junk files and repair common Windows errorsFree Scan →#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
const puppeteer = require('puppeteer');
(async () => {
const browser = await puppeteer.launch();
try {
const page = await browser.newPage();
await page.goto('https://news.ycombinator.com', {
waitUntil: 'networkidle2',
});
await page.screenshot({ path: 'hn.png' });
} finally {
await browser.close();
}
})();
Run it with node screenshot.js. The path tells Puppeteer to write the image to disk. Puppeteer infers the format from the file extension when you supply a path; the documentation identifies PNG as the default screenshot format. Using .png makes the intended format clear.
Navigation readiness is not the same as visual completeness
waitUntil: 'networkidle2' is the condition used in Puppeteer’s guide example, not a guarantee that every page is ready for every screenshot. A page may continue rendering or load content in response to user interaction after navigation settles. If the target content appears later, wait for a page-specific selector before capturing it. For a one-off delay, make the reason and duration explicit in your script rather than assuming that a navigation condition covers every site.
Choose between bytes, base64, and a file
Without path, Puppeteer does not write the screenshot to disk. The return value is binary image data represented as a Uint8Array by default. You can handle those bytes in memory or set encoding: 'base64' to request a base64 string.
| What you need | How to configure it | Result |
|---|---|---|
| A file on disk | { path: 'capture.png' } |
Puppeteer saves an image; the extension determines its format. |
| Binary data in your program | Call page.screenshot() without path |
A Uint8Array; nothing is automatically saved to disk. |
| Text representation | { encoding: 'base64' } |
A base64 string rather than the default binary data. |
Use bytes when the next step can consume binary data directly, such as passing it to another part of your application. Base64 can be useful when a downstream interface specifically expects text, but it is not itself an image file: decode it before writing a conventional image to disk. If you both need a file and want to process data in memory, decide which output path your application needs rather than assuming that an omitted path also creates a file.
Recommended Free Tools
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
Capture a full page, a region, or one element
Capture the entire page
Set fullPage: true to capture the page beyond its initial viewport:
await page.screenshot({
path: 'full-page.png',
fullPage: true,
});
This is the direct choice for a long page when you need one image rather than a viewport-only shot. Check the resulting dimensions and file size if the page is unusually long: a full-page image necessarily covers more rendered content than a viewport capture.
Capture a clipped rectangle
Use clip when you want a specific region rather than the whole page or a DOM element. A clip describes the capture rectangle. Puppeteer’s documentation notes that captureBeyondViewport defaults to false when there is no clip and to true when a clip is supplied. If you explicitly set it, keep that relationship in mind: the setting controls whether capture can extend beyond the viewport, and a clip changes its default.
await page.screenshot({
path: 'region.png',
clip: { x: 0, y: 0, width: 640, height: 400 },
});
The rectangle’s coordinates and dimensions should match the rendered page area you intend to capture. A clip is a geometric crop; it does not identify or follow a particular DOM node. When your goal is to capture a component regardless of its position, an element screenshot is usually clearer.
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.
Capture a single DOM element
Find the element, then call screenshot() on its handle. Puppeteer attempts to scroll the element into view before capturing it. If the element has been removed from the DOM by the time the screenshot runs, the method throws because its handle is detached.
const target = await page.$('#report-card');
if (!target) {
throw new Error('Could not find #report-card');
}
await target.screenshot({ path: 'report-card.png' });
Replace #report-card with a selector that uniquely identifies the item you want. For pages that render the component after navigation, wait for the selector before obtaining the handle:
await page.waitForSelector('#report-card');
const target = await page.$('#report-card');
if (!target) {
throw new Error('Could not find #report-card');
}
await target.screenshot({ path: 'report-card.png' });
Waiting first helps with late-rendered content, but it does not prevent a page script from removing or replacing the element afterward. If that happens, locate the current element again immediately before capture.
Set image format, quality, and background
You can select an output format with the screenshot type option, or let Puppeteer infer it from the path extension. PNG is the documented default. The quality option accepts a value from 0 to 100, but it does not apply to PNG. Therefore, changing quality while still producing a PNG will not give you the format-specific quality control that option is meant to provide.
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
await page.screenshot({
path: 'capture.jpg',
type: 'jpeg',
quality: 80,
});
Use omitBackground when you want Puppeteer to hide the default white background and allow transparency:
await page.screenshot({
path: 'transparent.png',
omitBackground: true,
});
Choose the format based on the next consumer of the file. For example, PNG is a straightforward default when you want a lossless image, while a format with a quality setting is appropriate when you need that control. Confirm that the file extension, selected type, and any downstream expectations agree.
Make capture timing and cleanup deliberate
A screenshot is useful only if the page has reached the state you mean to capture. Navigation completion and visual readiness are related but not interchangeable: a site can populate a chart, image, or other component after the initial document load. Add a wait that reflects the page’s actual readiness, such as waiting for the target element on a component capture. Avoid treating a fixed delay as universal; page behavior varies.
Close the browser when work is complete, including when navigation or capture fails. The first example uses try/finally for that reason: browser processes consume resources, and a thrown error should not bypass cleanup. If you are capturing multiple pages in a larger program, manage browser and page lifetimes deliberately rather than launching a new browser for every single image without considering the cost of that setup.
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.
For repeatable output, also keep the target URL, wait condition, capture scope, and output format explicit. If a screenshot changes unexpectedly, those choices provide a compact set of variables to inspect before blaming the image-writing step.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Troubleshoot common screenshot failures
- No image file appears: If you omitted
path, Puppeteer returned image data rather than saving it. Supply a path to save directly, or explicitly write the returned bytes using your application’s file-handling code. - The capture shows only the first screen: A regular page screenshot captures the viewport. Add
fullPage: truewhen you need the entire page. - The target element cannot be found: The selector may not match the rendered DOM, or the element may not yet exist. Check the selector and wait for it before obtaining the handle.
- An element screenshot throws because the node is detached: The page replaced or removed the element after your code selected it. Find the current element again immediately before the screenshot.
- The screenshot is blank or shows an earlier state: The page may need a more specific readiness condition than the navigation wait. Wait for the content you intend to capture, then take the screenshot.
- The output format or quality is unexpected: Check the path extension and
type. Remember thatqualityfrom 0 to 100 does not apply to PNG. - A clipped capture does not behave as expected outside the viewport: Review the supplied
clipand thecaptureBeyondViewportsetting. Its default is different when a clip is supplied. - The background is white when transparency was expected: Set
omitBackground: trueand use an output path/format that matches your intended transparent image workflow.
Or skip the browser setup
If you need an HTTP screenshot service instead of running Puppeteer in your own browser process, ScreenshotNeo accepts a URL in one GET request and returns an image or PDF. For a WebP capture:
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. It removes cookie and consent banners, newsletter popups, and chat widgets before the capture; those steps can be turned off. Bot checks and CAPTCHAs, blank pages, timeouts, failed loads, and cache hits are not billed, 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 per month without a card; paid plans start at $5 for 3,000 screenshots. Sign up for the free plan to get started.
Which Puppeteer screenshot method should you use?
Use Page.screenshot() for the visible page, a full-page image, or a rectangular clip; use ElementHandle.screenshot() for a particular DOM element. Decide whether the result belongs on disk, in memory as bytes, or as base64 before choosing output options. Then make readiness explicit so the captured state is the one your code actually needs.
Frequently Asked Questions
Does a Puppeteer screenshot call capture a live webpage or the page’s source HTML?
It captures the rendered page in the browser, rather than returning the HTML source as an image.
Can I return image data without creating a file?
Yes. Omit the path option and use the returned data in your program.
Does the Puppeteer screenshot guide specify a performance benchmark?
No performance statistic is established in the documentation details covered here, so capture speed depends on the page and setup.
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.
Quick wins for a faster PC:
Clear out junk files and repair common Windows errorsFree Scan →Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →Repair Windows errors before they cause bigger problemsFix Now →

