logo of Screenshot for Web
Free toolsPlaygroundDocsBlogPricing
LoginDashboard

Company

HomeFeaturesPricingBlogFacts

Screenshot Tools

Website ScreenshotsFull Page ScreenshotsScrolling ScreenshotsWebsite HistoryPDF Generation APIScreenshot API

Legal

Terms of UsePrivacy PolicyCookie PolicyCopyrightSecurity

Support

FAQSupportContact UsAPI Status
screen shot for web logo

No clutter. No distractions. Just clean, full-page screenshots with smart customization.

© 2026 HYDRANODE LTD. All rights reserved.

Screenshot for Web is operated by HYDRANODE LTD, a company registered in England and Wales, company number 15672526. Registered office: 124 City Road, London, London, England, EC1V 2NX.

FacebookInstagramLinkedInYouTube
  1. Home
  2. Blog
  3. Research

Puppeteer vs Playwright for screenshots: 240 captures timed, and where each one broke

We captured 20 real pages three times in Puppeteer and Playwright, in both headless modes. Speed was a wash; fonts, timeouts and redirects were not.

Screenshot for Web·November 6, 2026·8 min read

Sources

  1. Puppeteer: ScreenshotOptions interface
  2. Puppeteer: Headless modes
  3. Playwright: Browsers (Chromium headless shell and the chromium channel)
  4. Playwright: Release notes (version 1.65)
  5. Playwright 1.65.0 source: screenshot option docs (params.md)
  6. Playwright 1.65.0 source: screenshotter.ts, which waits for document.fonts.ready
  7. Puppeteer: PuppeteerLifeCycleEvent (networkidle0 and networkidle2)
  8. Chrome for Developers: Download chrome-headless-shell

How this article was made

Researched and drafted with AI assistance from the sources listed. On 6 November 2026 we ran every script in this article with Puppeteer 25.16.0 (Chrome for Testing 156.0.8078.47) and Playwright 1.65.0 (Chromium 158.0.8127.18) on Node 22.21.1, on an Apple M5 Mac running macOS 26.6, over an ordinary home broadband connection. The 240 timed captures, the font test, the bbc.com race test and the code samples were all run that day, and the numbers are copied from their output.

Capture any page without ads, banners or chat widgets, free and without an account.

Try the free tools

More articles

  • News

    Puppeteer 25.19 stops print and dark mode emulation from cancelling each other

    Before Puppeteer 25.19.0, emulateMediaType and emulateMediaFeatures reset each other, losing print or dark mode. Our tests, the fix and a workaround.

    November 26, 2026
  • News

    Chrome 158 drops XSLT: what it does to screenshots of sitemaps and feeds

    We captured eight live sitemaps in Chrome 156 and Chromium 158. Styled pages turn into raw XML, a red warning bar is already in captures, and two fixes work.

    November 9, 2026
  • Research

    Chrome DevTools' full-size screenshot: where it fails on long and lazy pages

    We ran DevTools' full-size screenshot on six long pages: it stops at 16,384 pixels and misses content that appears on scroll. Here's why, and the fixes that worked.

    November 8, 2026

For taking screenshots, Puppeteer and Playwright are about equally fast: in our test of 20 real pages, captured three times in each library and in both of Chrome's headless modes, the median capture took between 0.66 and 0.93 seconds, and the biggest gap, in starting the browser, came from the headless mode rather than the library. The differences that matter are elsewhere. Playwright waits for web fonts before every screenshot and Puppeteer does not, so Puppeteer can save a blank page. Neither library puts a timeout on a screenshot by default, and when a page redirected itself straight after loading, Puppeteer's screenshot sometimes never returned at all.

This article gives the numbers, the failures we hit and the code that avoids them.

How we tested

We captured the same 20 home pages (example.com, MDN, GitHub, python.org, nodejs.org, go.dev, rust-lang.org, w3.org, web.dev, bbc.com, apple.com, microsoft.com, vercel.com, npmjs.com, gnu.org, mozilla.org, cloudflare.com, ietf.org, the WHATWG HTML spec and docs.docker.com) in four setups:

SetupLaunch callBrowser it ran
Puppeteer, new headlesspuppeteer.launch()Chrome for Testing 156
Puppeteer, shellpuppeteer.launch({ headless: "shell" })chrome-headless-shell 156
Playwright, defaultchromium.launch()Chromium headless shell 158
Playwright, chromium channelchromium.launch({ channel: "chromium" })Chromium 158, new headless

The two headless modes are different programs. Chrome's "new" headless mode is the real browser running without a window. The older mode now ships separately as chrome-headless-shell, which Chrome's team describes as a lightweight wrapper better suited to automated screenshots, and which Puppeteer's guide says is "more performant for automation tasks" but doesn't fully match regular Chrome. Puppeteer uses new headless by default; Playwright uses the shell by default and switches to new headless with the chromium channel.

Each capture opened a fresh page at 1280 × 800, loaded the URL with waitUntil: "load" and a 30-second limit, took a viewport screenshot and then a full-page PNG, and timed each step. We ran three rounds and rotated the order of the setups on every page so none always hit a cold cache. That is 240 capture attempts. We capped every step at 45 seconds, for a reason explained below.

One caveat up front: the two libraries ship different Chrome builds (156 and 158), so a library comparison is also a browser-version comparison. That is what you get when you install each with its defaults.

Speed: closer than the arguments suggest

Medians over the 18 pages that every setup captured in every round (54 captures per setup), in milliseconds:

SetupOpen pageLoadViewport shotFull-page shotWhole capture
Puppeteer, new headless37366100215660
Puppeteer, shell5735183199675
Playwright, default (shell)5831474226722
Playwright, chromium channel102343100257927

Page loading dominates, and it depends on the site and the network, not the library. The screenshot calls themselves differ by tens of milliseconds. The only clear gap is launching the browser, which happens once per run:

SetupLaunch, rounds 1 / 2 / 3
Puppeteer, new headless1,183 / 567 / 652 ms
Puppeteer, shell135 / 128 / 130 ms
Playwright, default (shell)255 / 178 / 98 ms
Playwright, chromium channel602 / 315 / 290 ms

By the median of the three launches, the shell started five times faster than new headless in Puppeteer (130 against 652 ms) and 1.8 times faster in Playwright (178 against 315 ms). If you launch a browser per screenshot, as some serverless setups do, that matters more than the choice of library. If you keep one browser open and reuse it, it barely matters at all.

The same page is not always the same height

Full-page heights agreed across all four setups on 10 of the 18 pages. Where they differed, the clearest cases split by browser build or headless mode, not by library:

PagePuppeteer new / shellPlaywright shell / channel
html.spec.whatwg.org/multipage35,834 / 35,834 px36,164 / 36,164 px
web.dev6,787 / 6,990 px6,990 / 6,787 px
github.com7,661 / 7,661 px7,596 / 7,596 px

The HTML spec page and github.com split by Chrome version (156 against 158). web.dev split by headless mode: both shells gave 6,990 pixels and both new-headless browsers gave 6,787. Other pages, such as microsoft.com, w3.org and MDN, changed height between rounds in the same setup, because the pages themselves changed between loads. If you compare screenshots over time, as in visual regression testing, pin the browser build and the headless mode, and expect some pages to vary anyway.

Fonts: Playwright waits, Puppeteer does not

Playwright's screenshot code waits for document.fonts.ready before it captures. You can see it in the 1.65.0 source, which logs "waiting for fonts to load..." first. Puppeteer's page.screenshot() has no such step.

To see the effect, we served a page whose only web font arrives 1.5 seconds late, with font-display: block so the browser hides the text until the font is ready. We screenshotted it straight after DOMContentLoaded and counted the dark pixels:

RunScreenshot call tookDark pixels
Puppeteer, page.screenshot()929 ms0
Puppeteer, after await document.fonts.ready1,557 ms3,630
Playwright, page.screenshot()1,520 ms3,630

The plain Puppeteer capture is a blank white image, as the picture at the top of this article shows. One line fixes it:

await page.evaluate(() => document.fonts.ready);

document.fonts.ready only covers fonts the page has already asked for. It does not wait for lazy-loaded images or content that a script adds later; our guide to waiting for the right moment covers those.

Timeouts: a screenshot can wait for ever

Neither library times out a screenshot on its own. Puppeteer's ScreenshotOptions has no timeout option at all. Playwright's has one, but in JavaScript it "Defaults to 0 - no timeout" unless you set actionTimeout or call setDefaultTimeout.

This mattered on bbc.com. From our test machine, bbc.com loads, fires its load event and then, about 200 milliseconds later, sends itself to bbc.co.uk with a script. A screenshot requested in that gap races the navigation. Over the three benchmark rounds:

Setupbbc.com captured
Puppeteer, new headless0 of 3: hung once, then "Not attached to an active page" twice
Puppeteer, shell0 of 3: hung every time
Playwright, default (shell)3 of 3
Playwright, chromium channel3 of 3

We expected that to make Playwright the clear winner, so we ran the race on its own, five fresh browsers per setup, screenshot straight after load:

SetupSucceededHow the failures looked
Puppeteer, new headless4 of 5no answer after 30 s
Puppeteer, shell4 of 5no answer after 30 s
Playwright, default (shell)2 of 5"Unable to capture screenshot" after about 0.5 s
Playwright, chromium channel5 of 5none

So both libraries lose this race some of the time, and the three benchmark rounds were partly luck. The real difference is how they fail: Playwright gave an error in half a second, which you can catch and retry, while Puppeteer's call sat waiting until something outside it gave up. In a screenshot service that would tie up a browser page indefinitely. A traced Puppeteer run showed the page reaching bbc.co.uk 575 ms in, after which the pending screenshot never came back. Our earlier attempt at this benchmark, run without step limits, stalled on exactly this page.

The fix has two parts: let the page finish navigating before you capture, and put a limit on the screenshot. This version captured bbc.co.uk five times out of five:

import puppeteer from "puppeteer";

// Puppeteer's page.screenshot() has no timeout option, so give it one.
function withTimeout(promise, ms, label) {
  let timer;
  const timeout = new Promise((_, reject) => {
    timer = setTimeout(() => reject(new Error(`${label} took longer than ${ms} ms`)), ms);
  });
  return Promise.race([promise, timeout]).finally(() => clearTimeout(timer));
}

const browser = await puppeteer.launch();
const page = await browser.newPage();
await page.setViewport({ width: 1280, height: 800 });
await page.goto("https://www.bbc.com", { waitUntil: "networkidle2" });
await page.evaluate(() => document.fonts.ready);
await withTimeout(page.screenshot({ path: "bbc.png" }), 15_000, "screenshot");
console.log("captured", page.url());
await browser.close();

Output, run five times:

captured https://www.bbc.co.uk/
captured https://www.bbc.co.uk/
captured https://www.bbc.co.uk/
captured https://www.bbc.co.uk/
captured https://www.bbc.co.uk/

networkidle2 waits until there have been no more than two network connections for 500 ms, which in our runs was long enough for the redirect to finish. In Playwright, set the limit once with page.setDefaultTimeout(), which also covers screenshots:

import { chromium } from "playwright";

const browser = await chromium.launch();
const page = await browser.newPage({ viewport: { width: 1280, height: 800 } });
page.setDefaultTimeout(15_000);
await page.goto("https://www.bbc.com", { waitUntil: "networkidle" });
await page.screenshot({ path: "bbc-playwright.png" });
console.log("captured", page.url());
await browser.close();

This one also printed captured https://www.bbc.co.uk/ in all five of our runs.

One more failure in the data had nothing to do with either library: gnu.org timed out on load in 10 of 12 attempts, in all four setups.

The API: Playwright has more screenshot options built in

Both libraries take viewport, full-page, clipped and element screenshots, in PNG, JPEG or WebP. Playwright adds options that Puppeteer leaves to you:

NeedPuppeteer 25.16Playwright 1.65
Wait for web fontsdo it yourselfbuilt in
Stop CSS animationsdo it yourselfanimations: "disabled"
Hide the text cursordo it yourselfcaret: "hide", the default
Cover parts of the pagedo it yourselfmask: [locators]
Extra CSS for one shotaddStyleTag, which stays on the pagestyle, applied only while capturing
Timeoutnonetimeout, 0 (none) by default

Here is the same task in each: a full-page JPEG of go.dev with its header hidden. Puppeteer:

import puppeteer from "puppeteer";

const browser = await puppeteer.launch();
const page = await browser.newPage();
await page.setViewport({ width: 1280, height: 800 });
await page.goto("https://go.dev", { waitUntil: "load" });
await page.addStyleTag({ content: "header { visibility: hidden }" });
await page.evaluate(() => document.fonts.ready);
await page.screenshot({ path: "go-puppeteer.jpg", fullPage: true, type: "jpeg", quality: 80 });
await browser.close();

Playwright:

import { chromium } from "playwright";

const browser = await chromium.launch();
const page = await browser.newPage({ viewport: { width: 1280, height: 800 } });
await page.goto("https://go.dev", { waitUntil: "load" });
await page.screenshot({
  path: "go-playwright.jpg",
  fullPage: true,
  type: "jpeg",
  quality: 80,
  style: "header { visibility: hidden }",
});
await browser.close();

Both produced a 1280 × 3840 JPEG, of about 384 KB from Puppeteer and 390 KB from Playwright. For more on each library's options, see our guides to Puppeteer full-page screenshots and Playwright screenshots.

Which one to use

  • Already using one? Stay with it. Nothing we measured would justify a rewrite.
  • Starting fresh and only taking screenshots? Playwright needs less code to get a correct picture, because it handles fonts, animations and the cursor itself. Puppeteer gets the same result with a few extra lines.
  • Launching a browser per capture? Use the headless shell in either library: it started 1.8 to 5 times faster.
  • Need the capture to match real Chrome? Use new headless (Puppeteer's default, or Playwright's chromium channel), and pin the version, since our full-page heights changed with both the mode and the Chrome build.
  • Either way: put a timeout on every screenshot, wait for fonts, and wait for pages that move themselves after load.

If you'd rather not run browsers at all, our free screenshot tool and API capture a page from a single request.