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

Use a browser automation script to capture every URL at every viewport size you care about. With Playwright, set each page’s viewport before navigating, then save one screenshot per URL-and-size pair. This lets you compare responsive layouts consistently instead of resizing pages by hand.

Plan the URL-by-viewport matrix

Start by listing the pages to capture and the viewport dimensions that matter. The work is a matrix: each URL is paired with each viewport, and each pair gets its own fresh capture. For example, three websites and two viewport sizes produce six screenshots.

Choose dimensions intentionally. A desktop width and a narrow mobile width can reveal responsive breakpoints, but use the same dimensions for all sites when the goal is comparison. For each output, include a recognizable site key and dimensions in the filename, such as store__1440x900__viewport.png. This naming pattern is a workflow convention, not a Playwright requirement.

Choose viewport, full-page, and scale settings

Viewport or full page

A viewport screenshot captures the visible browser area at the configured width and height. It is generally the right choice for comparing how different sites arrange content at a fixed screen size. A full-page screenshot captures the page’s full scrollable height; it is useful for documenting the whole page, but it is not an equivalent fixed-height comparison. Playwright documents the screenshot controls in its Page API.

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
Sale
Philips 24 Inch Computer Monitor FHD 100Hz VA VESA Flicker-Free, 241V8LB
  • 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

CSS pixels or device pixels

Playwright can save screenshots at CSS-pixel scale or device-pixel scale. CSS scale gives one output pixel per CSS pixel. Device scale reflects device pixels and can produce larger image dimensions on high-DPI configurations. Pick one scale and keep it consistent across the comparison set. See Playwright’s Emulation guide for viewport and device emulation details.

Viewport testing or device emulation

For responsive-width checks, a viewport is often enough. If you need a more realistic emulated device configuration, Playwright can also configure screen size, user agent, and touch-related properties. A viewport setting by itself does not reproduce every characteristic of a physical phone or tablet.

Capture multiple websites and sizes with Playwright

The following Node.js example creates a fresh page for every URL-and-viewport pair, sets the viewport before navigation, waits for the page load event, and writes viewport screenshots to a directory. It uses Playwright’s Chromium engine. Install the package and browser first:

Rank #2
Philips 22 Inch Computer Monitor FHD 100Hz VA VESA Flicker-Free, 221V8LB
  • 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
  1. Install Node.js, then create a project directory and run npm init -y.
  2. Install Playwright with npm install playwright.
  3. Install its Chromium browser with npx playwright install chromium.
  4. Save the script below as capture.js and run it with node capture.js.
const { chromium } = require('playwright');
const fs = require('node:fs/promises');

const urls = [
  { key: 'example', url: 'https://example.com' },
  { key: 'iana', url: 'https://www.iana.org' },
];

const viewports = [
  { width: 1440, height: 900 },
  { width: 390, height: 844 },
];

function safeKey(value) {
  return value.toLowerCase().replace(/[^a-z0-9_-]+/g, '-');
}

(async () => {
  await fs.mkdir('screenshots', { recursive: true });
  const browser = await chromium.launch({ headless: true });

  try {
    for (const site of urls) {
      for (const viewport of viewports) {
        const page = await browser.newPage({
          viewport: { width: viewport.width, height: viewport.height },
          deviceScaleFactor: 1,
        });

        try {
          await page.goto(site.url, {
            waitUntil: 'load',
            timeout: 60000,
          });

          const filename = `${safeKey(site.key)}__${viewport.width}x${viewport.height}__viewport.png`;
          await page.screenshot({
            path: `screenshots/${filename}`,
            fullPage: false,
            scale: 'css',
          });
          console.log(`Saved screenshots/${filename}`);
        } finally {
          await page.close();
        }
      }
    }
  } finally {
    await browser.close();
  }
})().catch(error => {
  console.error(error);
  process.exitCode = 1;
});

Change the sample URLs and site keys to your targets. deviceScaleFactor: 1 and scale: 'css' make the example’s output intent explicit. If you want a full-page image instead, set fullPage: true; that captures the scrollable document rather than just the configured viewport area.

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

When to use a browser context

The example creates pages independently so each URL-and-size capture starts with a separate page state. If you instead create several pages in one browser context, remember that context-level settings apply across its pages; use distinct contexts when you need different context configuration. In either pattern, configure the viewport before navigation so the site can respond to the intended dimensions from its first render.

Make captures reproducible

Record enough information to tell whether a visual difference came from the website or the capture environment. Keep a small manifest beside the images containing:

Rank #3
Sale
Dell 24 Monitor - SE2426H - 23.8-inch FHD (1920x1080) 144Hz 1ms Display, in-Plane Switching (IPS) Technology, AMD FreeSync™, TÜV 3-Star 2X HDMI, Tilt
  • 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.
  • Target URL and viewport width and height.
  • Browser engine and version.
  • Screenshot scale and whether capture was viewport-only or full-page.
  • Capture date, execution environment, and any wait condition or state setup.

Keep the browser version and host environment stable when comparing screenshots over time. Playwright notes that rendering can vary with operating system, browser version, settings, hardware, and headless mode; a pixel difference alone does not prove the site layout changed. Check whether the capture environment changed before treating a visual diff as a regression. See the Playwright snapshot documentation for related guidance on screenshot comparisons.

Handle dynamic content deliberately

Pages may render content after the initial load, including images, ads, animations, and API-driven components. There is no single readiness rule that works for every website. Use a consistent condition suitable for your pages, such as waiting for a known selector, and document it. A fixed delay may be easy to add, but it can be too short on a slow run and unnecessarily long on a fast one.

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

Run the capture set efficiently

The sample processes captures one at a time. That is a sensible starting point: it is easier to debug, uses fewer simultaneous browser resources, and avoids imposing an abrupt burst of requests on the target sites. For a large matrix, you can introduce limited concurrency after confirming that your machine and the sites handle it reliably. Keep the number of simultaneous pages bounded; launching every URL-size pair at once can consume substantial memory and create unnecessary load.

Rank #4
Sale
Samsung 27" Essential S3 (S36GD) Series FHD 1800R Curved Computer Monitor
  • 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

For repeat runs, keep the input URL and viewport lists in a stable order, retain the manifest, and write output to a predictable directory. If you need to compare changed images, ensure both runs use the same viewport, scale, browser version, wait condition, and host setup. Treat dynamic advertisements or personalized content as sources of variation rather than automatically as layout changes.

Troubleshoot failed or inconsistent captures

  • Screenshot uses the wrong responsive layout: Set the viewport before calling page.goto(), then make sure the intended width and height are being passed for that matrix row.
  • Navigation times out: Check that the URL is reachable from the machine running the script. Some pages keep network requests open or load slowly; choose a readiness condition appropriate to the page rather than assuming one wait setting fits every site. Raise the timeout only when a longer navigation is genuinely expected.
  • Page is blank or incomplete: Inspect whether navigation returned an error, whether the site requires authentication or consent, or whether content appears only after an interaction or delayed load. Add the necessary setup and a documented wait condition.
  • Images or below-the-fold content are missing: A viewport capture does not include the entire page, and content that loads only while scrolling may not yet exist. Use full-page capture when the goal is whole-page documentation and verify that lazy-loaded content has had a chance to load.
  • Images differ between repeat runs: Compare browser version, operating system, headless mode, scale, hardware, and dynamic page state. Keep the environment stable before interpreting pixel differences as product changes.
  • Output is unexpectedly large: Check whether device-pixel scale or a high device scale factor is in use. CSS scale may be more suitable when the comparison should use one output pixel per CSS pixel.
  • One site blocks or limits repeated requests: Reduce concurrency and capture frequency, and follow the target site’s access rules. A browser automation script does not guarantee that every site will permit automated access.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Or skip the browser setup

For a hosted capture instead of maintaining a local browser, ScreenshotNeo accepts one GET request with a URL and returns a screenshot or PDF. Its many options include viewport dimensions and device presets, full-page capture, output formats, and bulk capture of up to 100 URLs per call. Cookie banners, newsletter popups, and chat widgets are removed before the shot; bot checks, blank pages, timeouts, and failed loads are not billed, and cache hits cost nothing. An MCP server exposes screenshot tools to Claude, Cursor, and other MCP clients.

For a single capture, this cURL command saves a WebP screenshot:

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://example.com -o shot.webp

See the ScreenshotNeo API documentation for the request parameters, including viewport controls, and adapt the URL for your target. ScreenshotNeo’s Free plan includes 1,000 shots per month without a card; paid plans start at $5 for 3,000 shots. Sign up for 1,000 free screenshots a month, with no card required.

Best Value
Sale
Sceptre New 22-Inch Gaming Monitor, FHD 1080p, Up to 144Hz, HDMI, DisplayPort, Built-in Speakers, Machine Black (E225W-FW144 Series, 2026)
  • 【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.

FAQ

Should I use a new browser for every screenshot?

No. A single browser can host multiple pages. The important part for this workflow is setting the right viewport on each page before navigating and keeping page state appropriately isolated.

Does a screenshot at a mobile width prove how a real phone will render?

No. A viewport tests responsive layout at that width, but does not by itself emulate all physical-device properties. Use device emulation when screen, user agent, or touch configuration matters.

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.

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