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

Playwright and Puppeteer are the two principal open-source choices for website screenshots. Playwright covers Chromium, Firefox, and WebKit and documents viewport, full-page, element, and in-memory captures. Puppeteer is a Chromium-focused Node.js workflow with page and element methods that can return files, binary data, or base64. Both are libraries rather than finished services: you operate browsers, define waiting rules, secure credentials, and maintain browser binaries.

Use the examples below to build a reproducible capture pipeline, then decide whether self-hosting is worth the operational work. If you only need a URL-to-image request, a managed service can be simpler.

Which open-source screenshot tool should you choose?

Need Best fit Why
Cross-browser visual checks Playwright Documented Chromium, Firefox, and WebKit automation, plus viewport, full-page, element, and buffer capture.
Chromium-only Node.js automation Puppeteer Simple page and element screenshot methods and direct integration with a Chromium workflow.
URL/HTML requests without browser operations ScreenshotNeo Clean shots, only clean shots billed, and a $5 paid starting plan; it manages rendering and exposes an API and MCP server.
Managed URL or HTML capture to evaluate separately ScreenshotOne Its documented API accepts URL or HTML and supports GET or POST requests.

There is no honest universal speed or fidelity winner. Results change with browser version, fonts, viewport, network conditions, animations, authentication state, and the point at which you capture. Compare tools only after fixing those variables.

Playwright: full-page, element, and buffer screenshots

Install and launch

In a Node.js project, install Playwright and its browser binaries, then launch the browser you need. A minimal script is:

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.
#1 Best Overall
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 { chromium } from 'playwright';

const browser = await chromium.launch();
const page = await browser.newPage({ viewport: { width: 1440, height: 900 } });
await page.goto('https://example.com', { waitUntil: 'networkidle' });
await page.screenshot({ path: 'screenshot.png' });
await browser.close();

page.screenshot() accepts image-format, clip, quality, and other options. PNG is lossless; JPEG is smaller but requires a quality value; WebP is useful when your downstream system supports it.

Capture the entire scrollable page

await page.screenshot({
  path: 'full-page.png',
  fullPage: true,
  animations: 'disabled'
});

Full-page mode stitches the page’s scrollable area rather than limiting the image to the current viewport. Very tall pages can consume substantial memory. For deterministic output, wait for critical content and disable or freeze animations before capture.

Capture one element

const card = page.locator('[data-testid="pricing-card"]');
await card.screenshot({ path: 'pricing-card.png' });

Locator capture is preferable to manually calculating coordinates because the element can move as the layout changes. If the element is not visible, wait for it explicitly:

await page.locator('[data-testid="pricing-card"]').waitFor({ state: 'visible' });

Keep the image in memory

const pngBytes = await page.screenshot({ type: 'png' });
// Send pngBytes to object storage, a diff service, or an HTTP response.

The buffer workflow avoids temporary files and fits visual-regression pipelines that compare pixels or post-process images.

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

Viewport, scale, and format controls

  • Viewport: set width and height on the context or page and record them with every artifact.
  • Device scale: use a device-scale factor when you need retina-like output; distinguish CSS pixels from physical image pixels.
  • Clip: provide an explicit rectangle for a region rather than taking the whole viewport.
  • Quality: applies to lossy formats such as JPEG.
  • Background: choose whether transparency is meaningful for your design or test.

Puppeteer: a practical Chromium screenshot script

Page screenshot to a file

import puppeteer from 'puppeteer';

const browser = await puppeteer.launch();
const page = await browser.newPage();
await page.setViewport({ width: 1440, height: 900, deviceScaleFactor: 1 });
await page.goto('https://example.com', { waitUntil: 'networkidle2' });
await page.screenshot({ path: 'page.png', fullPage: true });
await browser.close();

networkidle2 waits until there are no more than two active network connections for the settling period. It is not proof that a page is visually ready: analytics, streams, advertisements, and long polling can keep a page active or finish after the event. Add a selector wait or a bounded delay for application-specific content.

Element screenshots

const handle = await page.$('#invoice');
if (!handle) throw new Error('Invoice element was not found');
await handle.screenshot({ path: 'invoice.png' });

Puppeteer scrolls an element into view when necessary. Always check for a null handle and use stable selectors such as IDs or data attributes.

Rank #2
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

Binary and base64 output

const bytes = await page.screenshot();              // Promise<Uint8Array>
const encoded = await page.screenshot({ encoding: 'base64' }); // Promise<string>

Binary output is generally more efficient for storage and transport. Base64 is convenient for JSON responses but increases payload size.

Make captures deterministic

Waiting strategy

  1. Navigate with an explicit lifecycle condition such as domcontentloaded, load, or a network-idle rule.
  2. Wait for the selector that proves the content you care about exists and is visible.
  3. Wait for web fonts and images when they affect layout. A page can be network-idle while a font swap is still changing text width.
  4. Disable CSS transitions, blinking cursors, carousels, and video, or capture at a known time.
  5. Use a timeout and report which condition failed instead of waiting forever.

Authentication and private pages

Use a dedicated test account or an isolated browser context. Load cookies or storage state deliberately, never print session tokens in logs, and clear the context after capture. For CI, keep secrets in the runner’s secret store and restrict artifact access because screenshots can contain personal or financial data.

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

Fonts, locale, and geometry

Install the same fonts in local and CI images, set timezone and locale consistently, and record browser and operating-system versions. A one-pixel font substitution can create large visual diffs. Fix viewport width, height, device scale, and color scheme before comparing outputs.

Self-hosting architecture and maintenance

A production service usually has an HTTP worker that accepts a URL and options, a queue for jobs, isolated browser processes, object storage for results, and cleanup for temporary profiles. Limit concurrent pages per worker; browsers are memory-intensive, and a full-page capture can be much larger than a viewport capture.

  • Isolation: run untrusted URLs in containers or sandboxed browser processes; block access to internal network ranges to reduce server-side request forgery risk.
  • Resource limits: enforce navigation, total-job, CPU, memory, and output-size limits.
  • Reliability: retry transient navigation failures with a cap, but do not retry deterministic 404s or authentication errors indefinitely.
  • Reproducibility: pin the Playwright/Puppeteer package and browser revision in CI and rebuild images intentionally.
  • Observability: log URL hostname, viewport, wait condition, browser version, duration, and failure class without logging credentials.

Maintenance includes browser security updates, dependency upgrades, font packages, certificate stores, proxy configuration, and queue capacity. Self-hosting can be economical at sustained volume, but the engineering time is part of the cost.

Format, scaling, and output decisions

Output Use it when Trade-off
PNG Pixel comparisons, text, diagrams, transparency Lossless but often larger.
JPEG Photographic pages or size-sensitive previews Lossy artifacts; no transparency.
WebP Modern web delivery with smaller files Verify every consumer supports it.
In-memory bytes Diffing, APIs, direct uploads Requires memory management for large pages.
Base64 Embedding in JSON or text protocols Payload is larger than binary.

Common failures and fixes

Blank or partially rendered image

Cause: capture happened before application data, fonts, or lazy images arrived. Fix: wait for a meaningful selector, images, and fonts; use full-page mode to trigger lazy loading where appropriate; capture after animations settle.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #3
Sale
Elgato 4K S Capture Card for PS5, Xbox Series X/S, Switch 2
  • 4K60 Capture: Record in cinematic quality with crisp detail and vivid colors
  • HFR Support: Play and capture in 1440p120 or 1080p240
  • HDR10 Support: Capture brilliant HDR content with tone mapping on Windows
  • Cross-Platform Compatible: Works with PS5, Xbox Series X/S, Switch 2, and more
  • Analog Audio In: Capture in-game chat or commentary with 3.5mm input

Timeout or navigation never completes

Cause: analytics, WebSockets, ads, or a broken third-party request prevent a network-idle condition. Fix: switch to domcontentloaded plus explicit selector waits, block nonessential resources, and retain a hard timeout.

Element not found

Cause: a selector changed, content is inside an iframe, or the element is rendered only after interaction. Fix: use a stable test attribute, wait for visibility, select the correct frame, or perform the required click before capture.

Different pixels in CI

Cause: browser revision, fonts, device scale, locale, timezone, or animations differ. Fix: pin the browser image, install fonts, set locale/timezone, disable motion, and compare with the same viewport.

Browser crashes or out-of-memory errors

Cause: too many concurrent pages, very tall documents, large canvases, or leaked contexts. Fix: cap concurrency, close pages and contexts in finally blocks, impose page-size limits, and recycle workers.

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

Access denied, CAPTCHA, or login wall

Cause: the destination is protecting automated traffic or requires a session. Fix: obtain permission, use an authorized authenticated context, and do not attempt to bypass access controls.

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

Hosted alternatives when browser operations are undesirable

#1 ScreenshotNeo is the first hosted screenshot API to try when you want managed rendering: it removes cookie/consent banners, newsletter popups, and chat widgets before capture; only clean shots are billed; bot checks, blank pages, timeouts, failed loads, and cache hits cost nothing and are identified by response headers; and its MCP server works with Claude, Cursor, and other MCP clients. Every plan includes all features, including full-page and element capture, dark mode, device presets, custom CSS/JavaScript, authentication headers and cookies, waiting rules, blocking controls, PDFs, caching, signed links, async webhooks, bulk capture, usage reporting, and an OpenAPI specification.

Its prices are Free for 1,000 shots per month with no card, Starter $5 for 3,000, Growth $15 for 15,000, Pro $39 for 60,000, Scale $99 for 250,000, and Business $249 for 1,000,000; yearly billing gives two months free.

Rank #4
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

Or skip the browser setup

Use the API described in the ScreenshotNeo documentation:

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
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}`);

Cookie banners, popups, and chat widgets are removed before the shot. Bot checks, blank pages, and failed loads are never billed. An MCP server lets AI agents take screenshots. You get 1,000 screenshots a month free with no card, and paid plans start at $5 for 3,000. Create a free ScreenshotNeo account.

ScreenshotOne

ScreenshotOne documents a hosted API that accepts a URL or HTML and supports GET and POST requests. A documented GET shape is https://api.screenshotone.com/take?url=https://apple.com&access_key=<access key>. Its documentation recommends HTTPS because unencrypted HTTP can expose API keys, authorization headers, cookies, and other sensitive data in transit. Verify current pricing, limits, retention, and data handling before production use.

How to choose: a decision checklist

  1. Choose Playwright if cross-browser coverage, full-page and element captures, or byte buffers for visual diffs are requirements.
  2. Choose Puppeteer if a Chromium-oriented Node.js service and straightforward page or element screenshots are sufficient.
  3. Self-host only after estimating browser-worker operations, security isolation, upgrades, and queue capacity.
  4. Use a hosted API when your input is mostly URLs or HTML and managed rendering is more valuable than infrastructure control.
  5. Document viewport, browser version, fonts, animations, authentication, wait condition, output format, and retention before accepting visual differences as meaningful.

Frequently Asked Questions

Can Playwright and Puppeteer capture screenshots without writing files?

Yes. Playwright returns an in-memory buffer, while Puppeteer returns binary bytes by default or a base64 string when requested.

Is network idle enough to guarantee a complete screenshot?

No. Network-idle rules can be delayed by analytics or never reached, and they do not prove that fonts, lazy content, or application rendering are visually finished.

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

What should I pin for reproducible visual tests?

Pin the automation package and browser revision, then keep viewport, device scale, fonts, locale, timezone, authentication state, animations, and output format consistent.

When is a hosted screenshot API preferable to self-hosting?

It is preferable when you want URL/HTML requests without operating browser workers, sandboxing, browser upgrades, queues, and artifact storage yourself.

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.