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.

Some links on this page are affiliate links: if you buy through them we may earn a commission, at no extra cost to you.

Remove unwanted elements in the page context immediately before capture, then call the screenshot API. In Playwright or Puppeteer, select the banner, modal, ad, or widget with a narrow CSS selector and either delete the matching nodes or hide them only for the screenshot. Deleting changes the DOM; Playwright’s screenshot-only style option changes rendering without changing the document.

Choose deletion, screenshot-only hiding, or a smaller target

Your choice depends on what the image must represent:

Method What changes Use it when Important limitation
DOM removal Matching nodes are removed from the live document. The screenshot should show the page after the obstruction was actually deleted, or later page code must not see the element. Scripts can insert a replacement later; run cleanup close to capture.
Screenshot CSS CSS hides or restyles elements only during Playwright capture. You need a clean image but want to leave page state and markup intact. It is not deletion. The option is Playwright-specific in the documented APIs used here.
Targeted element capture Only one locator or element handle is rendered. You need a component rather than a complete page. It does not clean unrelated content elsewhere on the page.

Use selectors you have inspected. A selector such as div, [role], or a broad layout class can remove the article, navigation, or a positioning container along with the obstruction.

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

Playwright: remove matched nodes with Node.js

Complete example

Install Playwright in your project with npm install playwright, then ensure the browser required by your installation is available. This script navigates, waits for a page-specific signal, removes current matches, and saves a full-page PNG.

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

(async () => {
  const browser = await chromium.launch();
  const page = await browser.newPage({ viewport: { width: 1440, height: 900 } });

  await page.goto('https://example.com', { waitUntil: 'domcontentloaded' });
  await page.locator('main').waitFor();

  const selectors = [
    '.cookie-banner',
    '#newsletter-modal',
    '.sticky-ad',
    '[data-testid="chat-widget"]'
  ];

  await page.evaluate((selectors) => {
    for (const selector of selectors) {
      document.querySelectorAll(selector).forEach((element) => element.remove());
    }
  }, selectors);

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

page.evaluate() runs in the page context, so document.querySelectorAll() sees the loaded document rather than Node.js objects. The code processes every current match for each selector. Replace the example URL and selectors with values verified for your target.

#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

One locator with evaluateAll()

await page.locator('.cookie-banner').evaluateAll((elements) => {
  elements.forEach((element) => element.remove());
});
await page.screenshot({ path: 'page.png' });

Playwright’s locator documentation describes locators as the central piece of its auto-waiting and retry-ability. evaluateAll() still operates on the matches that exist when it runs; it does not permanently prevent a client-side script from injecting another banner.

Playwright: hide elements only during capture

If the page should remain unchanged and the goal is only a clean image, inject capture CSS:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
await page.screenshot({
  path: 'page.png',
  fullPage: true,
  style: `
    .cookie-banner,
    #newsletter-modal,
    .sticky-ad,
    [data-testid="chat-widget"] {
      display: none !important;
    }
  `
});

Playwright documents this style option for hiding dynamic elements or changing their appearance during a screenshot. Its injected stylesheet pierces Shadow DOM and applies to inner frames. Because the DOM is not removed, page scripts, accessibility state, and later interactions see the original nodes. Use DOM removal when that distinction matters.

Masking is different

Playwright screenshot options can mask matched locators, covering them in the output. Masking obscures content; it does not remove or hide the element in the page. Choose it for privacy redaction, not for eliminating layout space.

Capture a single component instead of cleaning the page

When the requirement is a chart, card, or other component, capture that target directly:

const chart = page.locator('[data-testid="sales-chart"]');
await chart.screenshot({ path: 'sales-chart.png' });

Targeted capture avoids unrelated overlays elsewhere on the page. Confirm that the locator identifies the intended element and that it is visible before 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

Handle dynamic pages reliably

Clean up after the element appears

Run cleanup after navigation and after the obstruction has been inserted, but directly before the screenshot. A cleanup performed immediately after navigation can be undone by a consent manager or marketing script that runs later. Use a page-specific readiness condition such as a main-content locator, a known application state, or a short, justified delay; there is no universal wait that guarantees every site has finished injecting UI.

Remove late insertions with a final pass

await page.locator('main').waitFor();
await page.waitForTimeout(500); // only when the site needs this settling period
await page.evaluate((selectors) => {
  for (const selector of selectors) {
    document.querySelectorAll(selector).forEach((node) => node.remove());
  }
}, selectors);
await page.screenshot({ path: 'page.png', fullPage: true });

Keep the delay as small as the site allows. A fixed delay is less reliable than a meaningful readiness signal, so prefer a selector or application event when one is available.

Elements inside iframes

A top-level document.querySelectorAll() does not traverse an iframe’s separate document. In Playwright, obtain the correct frame and evaluate there:

const consentFrame = page.frameLocator('iframe[title="Consent"]');
await consentFrame.locator('.banner').evaluateAll((nodes) => {
  nodes.forEach((node) => node.remove());
});

For screenshot-only CSS, Playwright documents that the injected stylesheet reaches inner frames. For explicit deletion, always target the frame containing the node.

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

Shadow DOM

Ordinary selectors may not match nodes hidden behind a component’s shadow boundary. Playwright’s screenshot style injection is documented to pierce Shadow DOM; for DOM removal, use a component-specific locator or evaluate within the component’s accessible context rather than assuming a page-level query can reach it.

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.

Puppeteer: remove nodes before Page.screenshot()

Puppeteer 25.12.0 documents the same page-context sequence. Install it with npm install puppeteer:

const puppeteer = require('puppeteer');

(async () => {
  const browser = await puppeteer.launch();
  const page = await browser.newPage();
  await page.setViewport({ width: 1440, height: 900 });
  await page.goto('https://example.com', { waitUntil: 'domcontentloaded' });

  await page.evaluate(() => {
    document
      .querySelectorAll('.cookie-banner, #newsletter-modal, .sticky-ad')
      .forEach((element) => element.remove());
  });

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

For a selector list held in Node.js, pass it as an argument:

const selectors = ['.cookie-banner', '#newsletter-modal', '.sticky-ad'];
await page.evaluate((selectors) => {
  for (const selector of selectors) {
    document.querySelectorAll(selector).forEach((element) => element.remove());
  }
}, selectors);

Puppeteer’s page.$$eval() is concise when all unwanted nodes share one selector:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
await page.$$eval(
  '.cookie-banner, #newsletter-modal, .sticky-ad',
  (elements) => elements.forEach((element) => element.remove())
);
await page.screenshot({ path: 'page.png' });

Use ElementHandle.screenshot() when the output is one element rather than a full page.

Selector, layout, and timing checks

  • Inspect the match count before deleting: console.log(await page.locator('.cookie-banner').count()) in Playwright, or evaluate document.querySelectorAll(selector).length in Puppeteer.
  • Prefer stable attributes such as a tested ID, data attribute, or component class over generated framework class names.
  • Check whether removing a fixed overlay leaves a scroll lock on body. If the page remains unscrollable, remove only the overlay or restore the site’s intended overflow style in a narrowly scoped cleanup.
  • For full-page shots, verify that lazy-loaded images have appeared before cleanup and capture; otherwise the screenshot can contain empty image regions.
  • Disable animations through your automation settings or page CSS when transitions create inconsistent frames. Do not confuse animation disabling with element removal.

Troubleshooting common failures

The element is still visible

The selector may be wrong, the node may be inside an iframe or shadow tree, or a script may have reinserted it. Inspect matches, target the correct frame, and run the final cleanup immediately before capture. For Playwright, try screenshot style when the element is reachable through its documented cross-boundary styling.

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

The screenshot is blank or navigation fails

Wait for a page-specific readiness signal after navigation and check that the URL is reachable from the machine running the browser. Capture only after the main content locator is present; avoid treating a timeout as proof that the page is ready.

Content disappeared unexpectedly

Your selector is too broad or matches a shared ancestor. Log the number of matches, inspect each element, and narrow the selector. Keep a known-good screenshot before enabling cleanup so visual regressions are easy to identify.

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

Cleanup works locally but not in production

Responsive breakpoints, consent geography, authentication state, and A/B tests can change the DOM. Fix the viewport, user state, cookies, and URL in the production job, then select elements using attributes that remain stable in that state.

The process is slow or flaky

Browser startup, navigation, fonts, lazy resources, and arbitrary sleeps all add latency. Reuse a browser process for multiple pages, set an explicit viewport, wait on meaningful selectors, and keep the final cleanup small. If you use full-page capture, account for the additional rendering and scrolling work compared with an element screenshot.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Or skip the browser setup

ScreenshotNeo provides a website screenshot API and MCP server. One GET request returns PNG, JPEG, WebP, or PDF; it accepts cookie and consent banners before capture and removes more than 60 known consent platforms, newsletter popups, and chat widgets. Cleanup steps can be turned off individually. Bot checks or 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.

cURL

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

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

Python

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)

See the ScreenshotNeo documentation for request options. It also offers full-page capture with lazy images loaded, CSS-selector element capture, dark mode, device presets and custom viewports, retina scale, PDF controls, custom CSS and JavaScript, click and wait actions, ad/tracker/request blocking, headers, cookies, user agents, authorization, timezone and geolocation, transparent backgrounds, resizing, selectable cache TTLs, signed image links, asynchronous jobs with signed webhooks, bulk capture for up to 100 URLs per call, a usage API, and an OpenAPI specification. The parameter names used by other screenshot APIs work as well, which can simplify migration.

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.

An MCP server exposes take_screenshot, get_page_info, and capture_pdf to Claude, Cursor, and other MCP clients. Every plan includes every feature: the Free plan allows 1,000 shots per month with no card; paid plans start at $5 for 3,000 shots. Sign up for the free ScreenshotNeo plan to try it without a card.

Cost, reliability, and operational notes

Self-hosted Playwright or Puppeteer costs you browser CPU, memory, maintenance, and the work of handling consent variants, frames, retries, and browser updates. An API removes that browser setup but introduces request authentication, network latency, and provider-specific limits. For ScreenshotNeo, only clean shots are billed; cache hits and the failed outcomes listed above are not. Record the returned verdict and billed headers in your job logs so retries and usage reconciliations are explainable.

For either approach, make captures reproducible: pin the automation package version, set viewport and device scale explicitly, use deterministic test data where possible, and store the selector set with the screenshot metadata. Recheck behavior against the documentation for the installed library version because screenshot and locator APIs are version-sensitive.

Frequently Asked Questions

Should I remove an element or use CSS hiding?

Use DOM removal when the page must behave as if the node no longer exists. Use Playwright’s screenshot style option when only the rendered image should 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.

Can a page-level selector remove content inside an iframe?

No. An iframe has a separate document. Select its frame first and perform evaluation in that frame; Playwright’s documented screenshot stylesheet can also apply to inner frames.

Why did a banner return after I removed it?

A client-side script inserted it again. Wait for the site’s readiness state and perform cleanup immediately before the screenshot, or hide it with capture CSS.

When is an element screenshot better than a full-page screenshot?

Use a locator or element-handle screenshot when you need one component and do not need surrounding page content.

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.