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

The best alternative depends on what “screen capture” means. Use Playwright when you need pixels from an actually rendered page, full page, or element in an automated browser. Use html-to-image or dom-to-image-more when you need a client-side image generated from a selected DOM node. Use the browser Screen Capture API when a user must choose a monitor, window, or tab to share. Keep html2canvas when its client-side reconstruction model and existing integration are acceptable.

These tools solve different problems. Choosing among them without separating browser pixels, DOM-to-image generation, and user-authorized screen sharing is the fastest way to get an output that looks wrong or cannot be automated.

First decide what you are capturing

html2canvas does not take a native screenshot. It walks the DOM, reads styles and assets, and reconstructs an image in a canvas. The result can differ from what the browser displayed when CSS, fonts, images, iframes, or dimensions exceed what the library and canvas can represent.

Map your requirement to one of these jobs:

Requirement Best starting point What you receive Main trade-off
Actual rendered page, full page, or element in automation Playwright PNG, JPEG, or a buffer from a controlled browser Browser runtime, deployment footprint, and readiness logic
Image generated from a DOM node in the user’s page html-to-image Client-side image data for a selected node You must validate CSS, fonts, SVG, images, and CORS in your application
Another client-side DOM-node image implementation dom-to-image-more Client-side image data for a selected node Same fixture-based validation; no universal winner is established
User-selected display, window, or tab for sharing or recording Screen Capture API A consented MediaStream Permission prompts and stream lifecycle; it is not static DOM export
Existing html2canvas integration that needs tuning html2canvas options A reconstructed canvas CSS, origin, iframe, and canvas limits remain

Playwright: the clearest choice for real browser screenshots

Playwright controls a real browser, so its screenshot operation captures the browser’s rendered output rather than rebuilding the page from DOM properties. Its documented API supports page screenshots, full-page screenshots, single-element screenshots, saving to a file, and returning a buffer.

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.
#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.

Install and create a page screenshot

npm install -D playwright
npx playwright install chromium
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: 'page.png', fullPage: true });
await browser.close();

For an element, wait for the selector and call screenshot on the locator:

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

Use page.screenshot() without path when an in-memory buffer is more useful than a file:

const png = await page.screenshot({ fullPage: false });
// Send png to object storage, an HTTP response, or an image-processing pipeline.

Make Playwright captures deterministic

  • Wait for meaningful readiness. networkidle can be useful, but application-specific selectors are often safer. Wait for a dashboard, chart, or table to exist and be visible.
  • Control the viewport and device scale. Set the viewport explicitly, and use a device preset when responsive CSS is part of the requirement.
  • Load fonts and data before capture. A screenshot taken while a web font or client-rendered component is still loading will be valid but visually wrong.
  • Authenticate deliberately. Create a browser context with the required cookies or headers rather than exposing credentials in a page URL.
  • Choose full-page carefully. Very long pages consume memory and can expose application bugs in lazy-loading logic. Scroll or capture sections when a single enormous image is unnecessary.

When Playwright is the wrong fit

Playwright is not a drop-in browser-side replacement for html2canvas. It needs a browser process, is usually run in Node.js or a CI worker, and is unsuitable when the user’s browser must immediately export a private DOM node without sending page state to a server. In those cases, test a DOM-image library instead.

html-to-image and dom-to-image-more for client-side DOM export

Both projects identify themselves as tools for generating images from DOM nodes. They are reasonable candidates when the capture must run inside the page and the input is a component such as a card, chart wrapper, or profile panel. Their project descriptions do not establish that either one universally has better CSS fidelity, speed, or browser coverage than html2canvas.

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

A fixture-based evaluation is more useful than a generic ranking

  1. Choose one representative component from your application.
  2. Include the difficult cases: web fonts, inline and external SVG, gradients, shadows, transforms, cross-origin images, an iframe, long text, and your responsive breakpoints.
  3. Render the same fixture with html2canvas, html-to-image, and dom-to-image-more in each supported browser.
  4. Compare text wrapping, font loading, image pixels, clipping, transparency, and output dimensions against a reference screenshot made by the target browser.
  5. Measure memory and completion time on the smallest device you support, not only on a developer workstation.

This process produces an application-specific decision. A library that works for a simple card may fail on a dashboard containing cross-origin images or an embedded document.

DOM-image failure modes to check

  • Fonts: wait until fonts are ready and verify that the generated image contains the intended face and weight.
  • SVG and filters: test masks, filters, external SVG references, and CSS effects individually.
  • Images: confirm that every image is loaded before conversion and that its origin permits canvas use.
  • Transforms and overflow: inspect rotated elements, clipped children, fixed positioning, and scroll containers.
  • Large nodes: check output dimensions and memory before allowing unbounded user content to become one image.
  • Iframes: a cross-origin iframe’s document is inaccessible to page JavaScript and cannot be reconstructed by these libraries.

Screen Capture API: for user-selected screens, not DOM export

The browser Screen Capture API asks the user to choose a display surface and returns a MediaStream. It is appropriate for screen sharing, recording, remote support, or user-selected tab capture. It does not silently export a particular DOM node to PNG and cannot replace an automated screenshot service.

const stream = await navigator.mediaDevices.getDisplayMedia({
  video: true,
  audio: false
});

const video = document.querySelector('video');
video.srcObject = stream;
await video.play();

stream.getVideoTracks()[0].addEventListener('ended', () => {
  video.srcObject = null;
  // The user stopped sharing or the browser ended the capture.
});

Call it from a user gesture such as a button click. Explain why permission is needed, handle cancellation, and stop tracks when the feature ends. If the product requirement says “export this invoice card,” use a DOM-image library or a browser automation workflow instead.

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

Can html2canvas be tuned enough?

Sometimes. Its configuration includes scale, width, height, windowWidth, windowHeight, useCORS, proxy, ignoreElements, and onclone. These controls can adjust capture bounds, exclude unstable elements, modify the cloned document, and request CORS-enabled image loading.

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

useCORS: true only helps when the image host sends suitable CORS headers. A documented proxy approach can relay assets when your architecture permits it. Neither option grants access to a cross-origin iframe’s document or adds unrestricted CSS support.

Canvas dimensions are browser- and device-dependent

The html2canvas FAQ gives rough, not guaranteed, limits: approximately 32,767 pixels for the maximum canvas dimension in Chrome/Chromium, Firefox, and desktop Safari; roughly 268 megapixels for Chrome/Chromium and 472 megapixels for Firefox. iOS Safari limits are lower and depend on device memory. An oversized canvas may be blank or partial without a clear exception. Treat these as estimates from the project’s documentation, not fixed guarantees.

Reduce scale, split long pages into sections, constrain user-controlled dimensions, and test on the least capable supported device. If the output must match browser pixels, changing options cannot turn DOM reconstruction into a native screenshot.

How to choose: a practical decision framework

  1. Define the output. Need browser pixels? Start with Playwright. Need a DOM node generated in the page? Compare html-to-image and dom-to-image-more. Need a person to choose a display? Use Screen Capture API.
  2. Choose the execution location. Browser-side code preserves local page context but inherits origin and memory restrictions. A controlled browser worker is easier to standardize for automation.
  3. Build the difficult fixture. Include fonts, SVG, gradients, shadows, transforms, cross-origin images, iframes, long content, and responsive breakpoints before committing.
  4. Set operational limits. Define maximum dimensions, timeouts, retries, concurrency, and what happens when a page never reaches its readiness condition.
  5. Review current project documentation. Check license, maintenance activity, browser support, output formats, and deployment requirements at adoption time. The basic repository descriptions alone do not establish comparative maintenance health or performance.

Or skip the browser setup

ScreenshotNeo is a website screenshot API and MCP server for developers. One GET request returns a PNG, JPEG, WebP, or PDF. Before capture it accepts cookie and consent banners and removes more than 60 known consent platforms, newsletter popups, and chat widgets; each cleanup step can be disabled.

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

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

The API includes full-page capture with lazy images loaded, CSS-selector element capture, dark mode, 12 device presets plus custom viewports, retina scale, PDF paper size/margins/orientation/page ranges, HTML/CSS-to-image, custom JavaScript and CSS, pre-capture clicks, hidden selectors, waits for selectors/delay/network idle, request and resource blocking, headers/cookies/user agent/Authorization, timezone and geolocation, transparent backgrounds, resizing, configurable-TTL caching, signed public image links, asynchronous jobs with signed webhooks, bulk capture of up to 100 URLs per call, a usage API, an OpenAPI specification, and compatible parameter names used by other screenshot APIs.

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 documentation for authentication and options. Equivalent clients:

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

The Free plan includes 1,000 shots per month with no card. Paid plans start at $5 for 3,000 shots; yearly billing gives two months free, and every feature is included on every plan. Sign up free to get the monthly allowance without entering a card.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Troubleshooting guide

The image is blank or only partly rendered

For html2canvas or another DOM-image library, inspect canvas dimensions, reduce scale, split the content, and verify that fonts and images finished loading. On iOS Safari, account for lower memory-dependent limits. For Playwright, confirm that the page reached the intended readiness selector and that lazy content was triggered.

Images disappear or trigger a security error

The image host must provide appropriate CORS headers for browser canvas use. Enable the library’s CORS option only when the server is configured for it, or use a permitted proxy. Do not expect this to grant access to a cross-origin iframe.

The capture has the wrong font or responsive layout

Wait for font loading, set an explicit viewport, and capture after the application has settled. In automation, use a controlled browser context; in client-side conversion, make the fixture reproduce the production CSS and font-loading path.

Screen sharing is rejected

Call getDisplayMedia() from a user action, handle the user-cancelled promise, and listen for the track’s ended event. A permissioned media stream is expected behavior, not a static image API.

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

Automation times out

Replace an indefinite network-idle wait with a selector that represents usable content, investigate requests that never settle, and set an explicit timeout. Capture a diagnostic screenshot or page log before retrying so the failure is distinguishable from a slow but valid page.

FAQ

Is Playwright a replacement for html2canvas in a React component?

Not directly. Playwright runs a controlled browser and is best when a worker or test process can open the page. A client-side DOM-image library is more suitable when the component must be exported inside the user’s current page.

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

Can any alternative capture a cross-origin iframe automatically?

No. Browser security prevents page JavaScript from reading a cross-origin iframe’s document. Capture the iframe at its own origin with cooperation from that application, or use a browser-level screenshot where the complete rendered page is available.

Should I use a screenshot or a media stream for screen recording?

Use the Screen Capture API for a user-selected display and recording workflow. Use a screenshot API or browser automation for discrete still images.

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

Which DOM-image package is objectively fastest?

No comparative benchmark is established here. Benchmark html-to-image, dom-to-image-more, and html2canvas on your own representative fixture and supported devices.

Frequently Asked Questions

Can Playwright capture an element instead of the whole page?

Yes. Locate the element, wait for it to be visible, and call the locator’s screenshot method.

Does setting html2canvas scale to a higher value fix missing CSS?

No. Scale changes output resolution; it does not add unsupported CSS, bypass origin rules, or make an iframe readable.

What should a production screenshot service return on a bot check?

Treat it as a distinct failed or blocked page state, record the verdict, and avoid charging or retrying indefinitely. ScreenshotNeo exposes page and billing status in response headers.

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.