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

Blurry Playwright screenshots usually come from one of four places: the capture scale, lossy image encoding, an unstable page at capture time, or differences in the browser or host environment. Diagnose those layers separately. Start by checking the image’s pixel dimensions and format; changing scale will not fix compression blur or inconsistent fonts.

1. Check screenshot scale and output dimensions

Playwright has two scale choices for a page screenshot. scale: 'css' produces one output pixel per CSS pixel. scale: 'device' produces one output pixel per device pixel, so it can create a larger image in a high-DPI context. For page.screenshot(), the documented default is 'device'. Do not assume the same default for visual assertions: toHaveScreenshot() defaults to 'css'.

Choose the scale that fits the image’s use

  • Use 'device' when you need device-pixel detail and your browser context has a device scale factor above 1.
  • Use 'css' when you want output dimensions that correspond directly to the page’s CSS dimensions, such as for a CSS-sized visual baseline.
  • Compare the saved file’s actual pixel dimensions with the size at which it is displayed. Enlarging an image beyond its captured dimensions can make it look soft, regardless of the Playwright setting.

Setting device scale is not a universal sharpness switch. A larger capture can still be resized by a later step, compressed, or rendered differently on another machine. Check the saved file itself before changing other settings.

Make the scale explicit

import { chromium } from 'playwright';

const browser = await chromium.launch();
const page = await browser.newPage({ viewport: { width: 1280, height: 800 } });
await page.goto('https://example.com');

await page.screenshot({ path: 'page-device.png', scale: 'device' });
await page.screenshot({ path: 'page-css.png', scale: 'css' });

await browser.close();

Replace the example URL with the page you need to capture. Save both versions and compare their pixel dimensions and appearance at the same display size. If one is sharper, note whether it is also larger; that distinction helps identify whether you have a scale issue or a downstream resizing issue.

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

2. Rule out lossy image compression

Playwright’s quality option applies to JPEG and WebP, not PNG. The documented JPEG default quality is 80. WebP quality 100 is lossless; lower WebP quality values are lossy. For diagnosis, capture PNG or lossless WebP before adjusting quality. If PNG looks sharp but a JPEG or lower-quality WebP does not, encoding—not capture scale—is the likely cause.

Compare formats without changing scale

await page.screenshot({ path: 'check.png', type: 'png', scale: 'device' });
await page.screenshot({ path: 'check.webp', type: 'webp', quality: 100, scale: 'device' });
await page.screenshot({ path: 'check.jpg', type: 'jpeg', quality: 80, scale: 'device' });

Keep the page state and scale the same for each capture. This makes the format comparison useful: changing several options at once makes it harder to tell which change affected the result. PNG is a good diagnostic reference when you want to avoid lossy quality settings.

3. Capture a stable page state

Animation, late-loading content, and changing page elements can make captures inconsistent. That inconsistency may look like a visual defect or cause screenshot comparisons to fail, but disabling animation does not increase pixel resolution.

For a one-off page screenshot

page.screenshot() allows animations by default. Disable them for a static capture when movement is not part of the image you need:

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.screenshot({
  path: 'stable-page.png',
  scale: 'device',
  animations: 'disabled'
});

If the page is still changing, first make sure the relevant content has finished loading or reached the state you intend to capture. A screenshot of a page mid-transition is not a reliable way to assess sharpness.

For Playwright Test visual assertions

toHaveScreenshot() waits until two consecutive screenshots match before it captures the image, and its documented default disables animations. This helps reduce visual-test noise from changing content. It does not make the resulting image higher resolution; choose the assertion’s scale explicitly if its default does not match your comparison requirements.

import { test, expect } from '@playwright/test';

test('page matches its screenshot', async ({ page }) => {
  await page.goto('https://example.com');
  await expect(page).toHaveScreenshot('page.png', { scale: 'css' });
});

Use the same scale choice for the baseline and the capture being compared. Mixing CSS-scale and device-scale images changes the pixel mapping and can produce a mismatch that is not a page-rendering regression.

4. Keep the rendering environment consistent

A screenshot can differ even when the page and test code have not changed. Playwright’s visual-comparison guidance warns that rendering can vary with the host operating system, browser version, settings, hardware, power source, headless mode, and other factors. Browsers and platforms can also render fonts differently.

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.

For visual baselines, create and compare screenshots in the same environment. Keep the operating system, browser version, relevant settings, and headless mode consistent where possible. If a screenshot becomes softer or text changes after moving a test to another machine or CI environment, compare those environments before changing page CSS or increasing capture scale.

Separate environment changes from resolution changes

  • If dimensions differ, investigate the viewport and whether the capture uses CSS or device scale.
  • If dimensions match but glyph shapes or spacing differ, investigate browser, host, and font rendering consistency.
  • If the file dimensions and rendering environment match but edges look blocky or smeared, compare an uncompressed PNG with the encoded output.

5. Isolate the part of the page that looks unclear

If only one section is difficult to inspect, narrow the capture to that target. Playwright supports locator masks, clipping, and full-page capture. A smaller target can make inspection more focused, but it does not inherently increase the source resolution.

const card = page.locator('.product-card');
await card.screenshot({ path: 'product-card.png' });

await page.screenshot({
  path: 'page-region.png',
  clip: { x: 0, y: 0, width: 640, height: 480 }
});

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

Use the locator or clip that corresponds to the region under investigation. A full-page image is useful when you need the whole document, but it should not be confused with a higher-resolution capture: it changes the captured area, not the pixel mapping by itself.

6. A practical diagnosis order

  1. Inspect the saved file: check its format and pixel dimensions, then view it at the size it is intended to occupy.
  2. Make scale explicit: compare CSS and device scale without changing the page or encoding settings.
  3. Use a lossless reference: compare PNG or WebP quality 100 against the format that looks blurry.
  4. Stabilize the page: disable animations for a static capture and ensure the content is in the intended state.
  5. Match environments: compare captures on the same browser and host setup, especially for text and font differences.
  6. Narrow the target: use a locator or clip when the defect is confined to one area.

Change one layer at a time and keep a reference capture. That makes it possible to distinguish a real resolution improvement from a larger file, a cleaner encoding, or a rendering change.

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.
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
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Common troubleshooting cases

“Device scale did not make the screenshot sharper.”

Check the resulting file dimensions and where it is displayed. Device scale maps output pixels to device pixels, but a high-DPI result may be resized later. Also compare PNG or lossless WebP to rule out compression and verify that the browser and host render consistently.

“The screenshot assertion looks different from page.screenshot().”

Check the scale setting on both paths. The documented default for page.screenshot() is device scale, while the screenshot assertion default is CSS scale. Specify scale explicitly when comparing the outputs.

“Text looks soft or slightly different in CI.”

Compare the baseline and CI rendering environments. Operating system, browser version, settings, hardware, headless mode, and font rendering can affect the image. A scale change will not make different font rendering identical.

“The capture changes from run to run.”

Look for animation or changing content. A page screenshot allows animations by default; disable them for a static capture. In a visual assertion, Playwright waits for two consecutive matching screenshots and disables animations by default, but other changing content can still matter.

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.

“Only one component is hard to inspect.”

Capture that element with a locator or use a clip around it. This isolates the area for review; it does not create more source pixels than the selected scale provides.

Or skip the browser setup

ScreenshotNeo is a website screenshot API and MCP server for developers. One GET request can return a PNG, JPEG, WebP, or PDF; its screenshot features include CSS or viewport-oriented capture options, and an MCP server gives AI agents tools to take screenshots, get page information, and capture PDFs. See the ScreenshotNeo API documentation.

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

ScreenshotNeo accepts cookie or consent banners like a visitor and removes more than 60 known consent platforms, newsletter popups, and chat widgets before capture; each of those steps can be turned off. Bot checks or CAPTCHAs, blank pages, timeouts, failed loads, and cache hits cost nothing, and response headers report the page verdict and billing status. Every plan includes every feature. The free plan includes 1,000 screenshots a month with no card; paid plans start at $5 for 3,000 screenshots.

Sign up for ScreenshotNeo’s free plan to get 1,000 screenshots a month with no card.

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.