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

The right way to take a web UI screenshot depends on what you need to inspect. Capture the viewport for the visible fold, the full scrollable page for long-page review, or a specific element for component-level work. For repeatable results, use browser automation such as Playwright, settle asynchronous content, and keep the browser and operating environment identical between captures.

Choose the screenshot scope first

A screenshot records rendered pixels at a particular browser state. Decide which state matters before choosing a tool or writing code.

Scope What it captures Best use Main limitation
Viewport The currently visible browser area Checking the fold, responsive layout, or a live interaction state Content below the fold is not included
Full page The entire scrollable document Reviewing long landing pages, documentation, and marketing layouts Very tall pages can be large and may contain content that loads only while scrolling
Element A selected DOM element or component Component documentation, focused bug reports, and visual tests It omits surrounding context

For a one-off inspection, a browser’s built-in capture may be enough. Use automation when screenshots must be repeatable, attached to tests, generated in bulk, or processed by another system.

Capture a page with Playwright

Playwright can save a screenshot to disk or return image bytes for post-processing. The examples below use JavaScript and Chromium. Install the package and browser once in a new project:

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
mkdir web-screenshots
cd web-screenshots
npm init -y
npm install -D playwright
npx playwright install chromium

Viewport screenshot

This captures only the current viewport. Set the viewport explicitly so a later run does not inherit a different window size.

const { chromium } = require('playwright');

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

networkidle waits for a quiet network, but it is not a guarantee that every animation, web font, or client-rendered widget has settled. Add an explicit condition for the state you actually need.

Full-page screenshot

Set fullPage: true to capture the full scrollable document, as if the page could fit on a very tall screen.

const { chromium } = require('playwright');

(async () => {
  const browser = await chromium.launch({ headless: true });
  const page = await browser.newPage({ viewport: { width: 1440, height: 900 } });
  await page.goto('https://example.com/docs', { waitUntil: 'domcontentloaded' });
  await page.waitForSelector('main');
  await page.screenshot({
    path: 'full-page.webp',
    fullPage: true,
    type: 'webp',
    quality: 85
  });
  await browser.close();
})();

Long pages with lazy images can require a scroll-and-wait step before capture. If a page loads images only when they approach the viewport, scroll through it, wait briefly, then capture:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
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
await page.goto('https://example.com/catalog', { waitUntil: 'domcontentloaded' });
await page.evaluate(async () => {
  await new Promise(resolve => {
    let last = 0;
    const timer = setInterval(() => {
      window.scrollBy(0, 700);
      const current = window.scrollY;
      if (current === last || current + window.innerHeight >= document.body.scrollHeight) {
        clearInterval(timer);
        resolve();
      }
      last = current;
    }, 100);
  });
});
await page.waitForTimeout(500);
await page.screenshot({ path: 'catalog-full.png', fullPage: true });

Screenshot one element

Use a locator when the component, rather than the whole page, is the subject of the review.

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

A stable test identifier is preferable to a brittle chain of CSS classes. If several elements match, narrow the locator with .first(), a role, or a unique attribute and fail deliberately when the expected component is missing.

Control format, scale, and image output

PNG is lossless and suited to pixel comparisons or text-heavy interfaces. JPEG is smaller for photographic content but introduces compression and cannot preserve transparency. WebP often offers a smaller file than PNG while retaining good quality.

Playwright accepts a filename extension or an explicit image type. JPEG and WebP quality can be set from 0 through 100. For in-memory processing, omit path and keep the returned buffer:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
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.
const imageBytes = await page.screenshot({
  type: 'png',
  animations: 'disabled'
});
// imageBytes is a Buffer; send it to storage, a test report, or an image processor.

Choose CSS-pixel or device-pixel output consistently. A higher device scale factor produces sharper images but larger files and can change antialiasing. Keep the same viewport, scale factor, browser build, and capture mode for baselines and comparisons.

Make visual regression screenshots deterministic

A changed pixel is evidence of a visual difference, not proof of a functional or accessibility defect. Rendering can vary with the host operating system, browser version, browser settings, hardware, power source, and headless mode. Freeze those variables in continuous integration and local baseline generation.

  • Pin the Playwright and browser versions used to create and compare baselines.
  • Use a fixed viewport, device scale factor, timezone, locale, color scheme, and reduced-motion preference.
  • Wait for a meaningful ready condition such as a page heading, table, or application state instead of relying only on a time delay.
  • Disable or freeze animations and transitions. Playwright’s screenshot assertions can wait for consecutive images to stabilize and can configure animation handling.
  • Use deterministic test data and block timestamps, rotating ads, random IDs, and live counters where possible.
  • Mask unstable or sensitive regions. A mask overlays the selected locator bounds so changing content does not dominate the diff.
await expect(page).toHaveScreenshot('dashboard.png', {
  fullPage: true,
  animations: 'disabled',
  mask: [page.locator('[data-testid="live-clock"]')],
  maskColor: '#808080'
});

Review a diff in context: inspect the baseline, actual image, and highlighted difference. A small font rasterization change may be environmental; a shifted button, clipped heading, or missing image is more likely a UI change. Keep visual assertions separate from semantic assertions such as accessible roles, labels, and keyboard behavior.

Screenshot evidence is not an accessibility tree

A screenshot is useful for layout, color, spacing, canvas, and chart content. It cannot tell you reliably whether a control has an accessible name, whether keyboard focus order works, or whether a heading has the right semantic level. Use an accessibility snapshot or DOM-oriented assertions for structure and interaction, and use screenshots as visual evidence alongside them.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #4
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

Useful capture controls for difficult pages

Wait for a selector, state, or delay

Wait for the selector that proves the page is ready, then capture. A short delay is appropriate for a known transition but should not replace a state check.

await page.goto('https://example.com/app');
await page.waitForSelector('[data-testid="results"]');
await page.waitForTimeout(250);
await page.screenshot({ path: 'results.png' });

Hide, mask, or style regions

Hide a cookie prompt or rotating widget when it is irrelevant to the review; mask it when its location matters but its content is unstable. You can also inject CSS to disable transitions or set a review-only theme.

await page.addStyleTag({ content: `
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
    caret-color: transparent !important;
  }
` });
await page.locator('.chat-widget').evaluate(el => el.remove());
await page.screenshot({ path: 'stable.png', fullPage: true });

Capture a specific interaction state

Perform the same actions before every capture: sign in with a test account, open a menu, select a tab, or click a button. Do not depend on a previously persisted browser profile unless that profile is deliberately versioned and reset between runs.

Common failures and fixes

Symptom Likely cause Fix
Blank or partially rendered image Capture ran before client rendering completed Wait for a visible application marker, fonts, and critical images; then capture.
Lazy images are missing The page never scrolled near those images Scroll through the document, wait for image completion, and use full-page capture afterward.
Flaky pixel diffs Animations, rotating content, timestamps, or rendering-environment drift Disable motion, freeze data, mask volatile locators, and pin browser/OS conditions.
Element locator times out Wrong selector, iframe, or element appears only after an action Verify the selector, switch to the correct frame, perform the prerequisite action, and wait for visibility.
Text wraps differently Different viewport, font availability, device scale, or browser build Use a fixed viewport and scale, install the same fonts, and use the same browser version.
Full-page image is unexpectedly huge Very tall content or oversized scale factor Capture a relevant element, lower device scale, or split the page into intentional sections.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

When a hosted screenshot API is a better fit

A hosted service avoids maintaining browser binaries and workers when you need an image from a URL rather than a test assertion. Compare services on capture scope, browser/device coverage, deterministic controls, output handling, test integration, baseline review, and whether you need one image or an automated batch.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
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.

ScreenshotNeo is the first service to try because it removes cookie banners, newsletter popups, and chat widgets before capture, bills only clean shots, and has a $5 paid plan for 3,000 shots.

Or skip the browser setup

ScreenshotNeo is a website screenshot API and MCP server. One GET request returns PNG, JPEG, WebP, or a PDF. Consent banners are accepted like a visitor and more than 60 known consent platforms, newsletter popups, and chat widgets can be removed; each cleanup step can be disabled. Bot checks and CAPTCHAs, blank pages, timeouts, failed loads, and cache hits are not billed, and the response identifies the result with X-Page-Verdict and X-Billed headers.

See the complete parameter list and request behavior in the ScreenshotNeo documentation. A basic cURL request is:

curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp

The same call in Python:

import requests

r = requests.get(
    "https://api.screenshotneo.com/v1/shot",
    params={"access_key": "YOUR_API_KEY", "url": "https://stripe.com"},
    timeout=90,
)
r.raise_for_status()
open("shot.webp", "wb").write(r.content)

And in Node.js:

const q = new URLSearchParams({ access_key: 'YOUR_API_KEY', url: 'https://stripe.com' });
const res = await fetch(`https://api.screenshotneo.com/v1/shot?${q}`);
if (!res.ok) throw new Error(`Screenshot failed: ${res.status}`);
const fs = require('node:fs');
fs.writeFileSync('shot.webp', Buffer.from(await res.arrayBuffer()));

Options for production captures

  • Full-page capture with lazy images loaded, or one element by CSS selector.
  • Dark mode, 12 device presets, custom viewports, and retina scale.
  • PDF paper size, margins, landscape mode, and page ranges.
  • HTML/CSS-to-image, custom JavaScript and CSS, and clicking before capture.
  • Wait for a selector, delay, or network idle; hide selectors; and block ads, trackers, requests, or resource types.
  • Custom headers, cookies, user agent, Authorization, timezone, geolocation, and transparent backgrounds (transparency is unavailable for JPEG).
  • Image resizing, a chosen cache TTL, signed links for public image tags, asynchronous jobs with signed webhooks, bulk capture of up to 100 URLs per call, a usage API, and an OpenAPI specification.
  • Parameter names used by other screenshot APIs are accepted, which can reduce migration work.

AI agents can use the MCP server’s take_screenshot, get_page_info, and capture_pdf tools from Claude, Cursor, or another MCP client.

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

Plans and billing

Plan Included shots Price
Free 1,000 per month $0, no card
Starter 3,000 $5
Growth 15,000 $15
Pro 60,000 $39
Scale 250,000 $99
Business 1,000,000 $249

Every feature is available on every plan, and yearly billing provides two months free. Create a free ScreenshotNeo account to get 1,000 screenshots each month with no card.

A practical decision checklist

  • Use a viewport image when the question concerns the visible fold or a specific responsive breakpoint.
  • Use full-page capture for a document or page whose below-the-fold layout matters.
  • Use an element capture for a component, bug report, or isolated visual baseline.
  • Use Playwright when the capture is part of a repeatable test or needs browser actions.
  • Use a hosted API when you need URL-to-image delivery, cleanup, asynchronous jobs, or bulk requests without operating browsers.
  • Pair screenshots with accessibility and DOM checks whenever structure or interaction is under review.

Frequently Asked Questions

Should I store screenshots in source control?

Store only intentional, reviewable baselines in source control; keep generated run artifacts in CI storage with the commit, browser version, viewport, and test name recorded.

How should I name screenshot files?

Include the route or component, state, viewport, and format, such as checkout-error-desktop-1440x900.png, so a reviewer can identify the capture without opening it.

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.

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.