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

To make a website screenshot from a URL, load that URL in a real browser and capture the rendered page. For a repeatable developer workflow, Playwright is the most direct option: navigate with page.goto(), then call page.screenshot(). Use the normal viewport capture for what a visitor sees, fullPage: true for the entire scrollable document, or a locator screenshot for one element. If you would rather not install or operate a browser, ScreenshotNeo returns a hosted image or PDF from one GET request.

The quickest working method

Playwright captures the page after a browser has rendered it, so it can include JavaScript-generated content rather than only the original HTML. The basic sequence is:

  1. Install Playwright and a browser engine.
  2. Open the URL with page.goto().
  3. Wait for the page state or a specific element when necessary.
  4. Call page.screenshot() and save the result.

Install Playwright

mkdir url-screenshot
cd url-screenshot
npm init -y
npm install playwright
npx playwright install chromium

The install command downloads Chromium for a consistent headless capture. Playwright can also launch WebKit or Firefox; use the engine that matches the rendering environment you need to reproduce.

Capture a visible viewport

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

(async () => {
  const browser = await chromium.launch();
  const page = await browser.newPage();
  await page.goto('https://example.com');
  await page.screenshot({ path: 'screenshot.png' });
  await browser.close();
})();

Save this as screenshot.js and run node screenshot.js. The default image is the current viewport. Set the viewport explicitly when the screenshot must have predictable dimensions:

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.
#1 Best Overall
Elebase USB to USB C Adapter for iPhone 18 Pro Max,USBC Car Charger Adapter
  • Read Before You Buy — No Video Output: These adapters support charging and USB 2.0 data transfer, but cannot transmit video signals. Except for standard USB webcams (which use USB data only), they are not compatible with HDMI/DisplayPort cables, video-capable USB-C hubs, or docking stations with video output.
  • Convert USB-A Ports to USB-C: Designed to connect USB-C earphones, cables, flash drives, card readers, and other USB-C accessories to standard USB-A ports. Plug-and-play with no drivers or software required.
  • Aluminum Alloy Housing: Built with a sturdy aluminum alloy shell that aids in heat dissipation and protects against daily wear and scratches. Designed to maintain a stable and secure connection.
  • Compact & Travel-Friendly: The ultra-compact design allows the adapter to stay plugged into your device without blocking adjacent ports or adding bulk, reducing wear and tear on your original USB ports.
  • 12-Month Warranty: Backed by a 12-month manufacturer warranty for peace of mind. Designed to meet strict quality control standards for reliable everyday performance.
const page = await browser.newPage({
  viewport: { width: 1440, height: 900 },
  deviceScaleFactor: 1
});

A larger deviceScaleFactor produces a higher-density image, similar to a retina display, while leaving the CSS viewport unchanged.

Choose what to capture

Full webpage

Use fullPage: true to capture the complete scrollable page as one tall image:

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

Very long pages can create large image files and may expose lazy-loading behavior. If images appear only after scrolling, trigger the page’s loading behavior or use a hosted service that explicitly supports full-page capture with lazy images loaded.

One element

Capture a specific element through a locator. The locator waits for the element and clips the image to its bounds:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
await page.locator('.header').screenshot({ path: 'header.png' });

Replace .header with a stable CSS selector. Prefer an ID, data attribute, or other selector that is unlikely to change over a layout class.

Keep the image in memory

Omit path when another process should resize, upload, hash, or compare the image without first writing it to disk:

Rank #2
Anker USB-C Hub, 5-in-1 USB Hub for Laptops, 4K HDMI Multiport Adapter
  • 5-in-1 USB-C Hub: Experience comprehensive connectivity featuring a Power Delivery input, two USB-A 2.0 ports, a USB-A 3.0 port, and an HDMI port. (Note: The USB-C power delivery input port is only for connecting an external wall charger to power your laptop and cannot power peripheral devices.)
  • 90W Pass-Through Charging: Achieve optimal charging with 90W pass-through power to your laptop, supported by a total input of 100W, with the hub reserving 10W for operational efficiency. (Note: Wall charger not included.)
  • Quick Data Transfers: Accelerate your productivity with rapid data transfers using a high-speed 5Gbps USB 3.0 port and two 480Mbps USB 2.0 ports.
  • 4K HDMI Display: Enhance your visual experience with a hub capable of delivering 4K resolution at 30Hz in both mirror and extend modes. Please note that this hub is compatible with MacBook (macOS 12 and newer), Windows 10 and 11, ChromeOS, and laptops equipped with DP Alt Mode and Power Delivery. Note: This device is not compatible with Linux.
  • What You Get: Anker USB-C Hub (5-in-1, 4K HDMI), welcome guide, 18-month warranty, and our friendly customer service.
const imageBytes = await page.screenshot({ type: 'png' });
await uploadToStorage(imageBytes);

The method returns image bytes when no path is supplied. A path ending in .png, .jpeg, or .webp selects the corresponding output format where supported by the installed Playwright version.

Clip an area or use a transparent background

For a custom rectangle, pass clip with x, y, width, and height. PNG captures can use a transparent background when the page and browser rendering permit it. Screenshot options also include animation handling; disable or control animations when movement would make comparisons unstable.

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.

Make the result repeatable

Wait for the content you actually need

page.goto() returning means navigation reached its selected load state, not necessarily that every application component is ready. Wait for a meaningful selector, a deliberate delay, or network idle when the site supports it:

await page.goto('https://example.com/dashboard', { waitUntil: 'domcontentloaded' });
await page.locator('[data-ready="true"]').waitFor();
await page.screenshot({ path: 'dashboard.png', fullPage: true });

Use a selector wait for an application-specific readiness signal. A fixed delay is a fallback for pages with no reliable signal; it increases run time and can still be too short. Network-idle waiting can help with request-driven pages but may never settle on sites that keep polling.

Control dynamic content

  • Hide rotating banners, timestamps, ads, or chat widgets with CSS before capture.
  • Use test data or a fixed account when the page changes between runs.
  • Disable animations or wait until transitions finish.
  • Keep viewport size, browser engine, browser version, operating system, headless mode, and device scale consistent.

Playwright Test’s toHaveScreenshot() assertion waits until two consecutive screenshots are identical before comparing them with a baseline. Rendering can still vary with host OS, browser version, settings, hardware, power source, and headless mode, so visual baselines should be created and checked in the same environment.

Handle lazy-loaded images

A full-page screenshot can be taken before images below the fold have loaded. Scroll through the page before the final capture, or wait for the specific image elements and verify their complete state. Do not assume that an HTTP response for the document means every image is ready.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #3
Sale
Anker USB C Hub, 7in1 Multi-Port USB Adapter, 4K@60Hz USBC to HDMI Splitter
  • Sleek 7-in-1 USB-C Hub: Features an HDMI port, two USB-A 3.0 ports, and a USB-C data port, each providing 5Gbps transfer speeds. It also includes a USB-C PD input port for charging up to 100W and dual SD and TF card slots, all in a compact design.
  • Flawless 4K@60Hz Video with HDMI: Delivers exceptional clarity and smoothness with its 4K@60Hz HDMI port, making it ideal for high-definition presentations and entertainment. (Note: Only the HDMI port supports video projection; the USB-C port is for data transfer only.)
  • Double Up on Efficiency: The two USB-A 3.0 ports and a USB-C port support a fast 5Gbps data rate, significantly boosting your transfer speeds and improving productivity.
  • Fast and Reliable 85W Charging: Offers high-capacity, speedy charging for laptops up to 85W, so you spend less time tethered to an outlet and more time being productive.
  • What You Get: Anker USB-C Hub (7-in-1), welcome guide, 18-month warranty, and our friendly customer service.

A reusable script with common options

This script accepts a URL, fixes the viewport, waits for the page to settle, and writes a full-page PNG. Change the selector and options for your site:

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

async function main() {
  const target = process.argv[2] || 'https://example.com';
  const browser = await chromium.launch();
  try {
    const page = await browser.newPage({
      viewport: { width: 1440, height: 900 },
      deviceScaleFactor: 1
    });
    await page.goto(target, { waitUntil: 'domcontentloaded', timeout: 60000 });
    await page.waitForLoadState('networkidle').catch(() => {});
    await page.screenshot({
      path: 'website.png',
      fullPage: true,
      animations: 'disabled',
      type: 'png'
    });
  } finally {
    await browser.close();
  }
}

main().catch(error => {
  console.error(error);
  process.exit(1);
});

Run it with node screenshot.js https://example.com. The timeout prevents a permanently stalled navigation. The catch around network-idle is intentional: pages with continuous analytics or polling may never become idle, while the document can still be usable after the DOM content has loaded.

Automation, batching, and storage considerations

One-off captures

For a single page, the short script is enough. Save a file when a person will inspect it, or keep bytes in memory when the next step is an upload or image transformation.

Repeated captures

Reuse a browser process for multiple URLs instead of launching a new process for every page. Create a fresh page or browser context per job when cookies and local storage must not leak between sites. Give each navigation a timeout and close pages in a finally block so a failed URL does not exhaust resources.

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

Visual regression tests

Use a fixed baseline environment and mask or hide regions that legitimately change. Compare after the page reaches a stable state, not immediately after navigation. A difference can come from fonts, operating-system rendering, animation, network timing, or real application changes.

File format and size

PNG is lossless and useful for pixel comparisons. JPEG is smaller for photographic pages but introduces compression differences. WebP can reduce size when your downstream tools accept it. Full-page images are often much larger than viewport images; resize them after capture when a thumbnail or card image is all that is needed.

Rank #4
Sale
UGREEN USB to USB C Adapter Combo 4-Pack, 10Gbps USB C Converter Space Gray
  • Dual Converters, Infinite Potential:Includes 2× USB C male to USB A female adapters and 2× USB A male to USB C female adapters. Perfect for a wide range of uses—tablets with Bluetooth keyboards, expand USB ports on macbook, and more. Two different converters for all your daily needs
  • Next-Level 10Gbps & 3A Charging: No more slow 480Mbps, this usb to usb c adapter has a transfer speed of up to 10Gbps, allowing you to do more transferring in less time. This usb adapter fits both USB A and USB C charger, supporting up to 3A fast charging
  • Upgraded Exquisite Craftsmanship: With an aluminum alloy housing and metal connector, the usbc to usb adapter is extremely durable and sturdy. Rigorously tested to withstand more than 10,000 times of plugging and unplugging, ensuring long-lasting performance
  • Broad Compatible: The usb c to usb adapter widely supports all USB C/ USB A devices like laptops, tablets, cellphones, car chargers, and phone chargers. Such as compatible with MacBook Pro/Air 2023/2022, Thunderbolt 4/3 Devices,Apple MagSafe Watch 9/8/7/SE/Ultra, iPad Pro 2022/2021, Samsung Galaxy S23/S20/S10, and iPhone 17/16/15 Pro. Plug and play
  • Please Note: To reach 10Gbps speed, keep the cable under 3.3 ft. For USB A Male to USB C adapters, try flipping the USB C connector. USB C Male to USB A adapters support bidirectional 10Gbps transfer within 3.3 ft

Troubleshooting common failures

Symptom Likely cause Fix
browserType.launch reports an executable is missing The browser binaries were not installed. Run npx playwright install chromium, or install the engine you launch.
The image is blank or only partly rendered The capture happened before JavaScript, fonts, or images finished. Wait for a readiness selector, specific images, or a suitable load state before calling screenshot().
Navigation times out The server is slow, blocked, or keeps requests open. Set an explicit timeout, try domcontentloaded, and wait for a page-specific selector instead of indefinite network idle.
Full-page output is missing below-the-fold images Lazy loading has not been triggered. Scroll or wait for image completion before the full-page capture.
Element screenshot fails because the locator is not found The selector is wrong, the element is inside a frame, or it is rendered only after an action. Inspect the selector, target the correct frame, and perform the required click or wait first.
Two captures differ although the page code did not change Dynamic content or a different rendering environment. Freeze test data, hide changing regions, disable animation, and keep browser, OS, viewport, scale, and headless settings consistent.
The process hangs after an error The browser was not closed. Put capture code in try/finally and close the browser in the finally block.
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 is the #1 hosted screenshot API choice here because it produces clean shots, bills only clean shots, and has a $5 paid plan. Its API accepts one GET request and returns a PNG, JPEG, WebP, or PDF. Before capture, it accepts cookie or consent banners like a visitor and removes more than 60 known consent platforms, newsletter popups, and chat widgets; each cleanup step can be turned off.

Use the API documentation at https://screenshotneo.com/docs/ for the full parameter list. The following calls use https://stripe.com as the target URL.

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

cURL

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

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)

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

Replace YOUR_API_KEY and the URL. The response headers identify the result: X-Page-Verdict says what happened and X-Billed says whether it counted. Bot checks or CAPTCHAs, blank pages, timeouts, failed loads, and cache hits cost nothing; only clean shots are billed.

Useful capture controls

ScreenshotNeo exposes controls that otherwise require browser code:

Need Available controls
Page area and device Full-page capture with lazy images loaded, one element by CSS selector, dark mode, 12 device presets, custom viewport, and retina scale.
Output PNG, JPEG, WebP, PDF with paper size, margins, landscape mode, and page ranges; HTML/CSS to image; transparent background; image resizing.
Page preparation Custom CSS and JavaScript, click an element before capture, hide selectors, and wait for a selector, delay, or network idle.
Network and identity Block ads, trackers, requests, or resource types; set custom headers, cookies, user agent, and Authorization; choose timezone and geolocation.
Operations Choose a cache TTL, create signed links for public <img> tags, submit asynchronous jobs with signed webhooks, capture up to 100 URLs per bulk call, query usage, and use the OpenAPI specification.
AI workflows An MCP server provides take_screenshot, get_page_info, and capture_pdf tools for Claude, Cursor, and other MCP clients.

The parameter names used by other screenshot APIs also work, which can reduce changes when switching providers. Every feature is available on every plan.

Plans and cost

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

Yearly billing gives two months free. Because failed loads and cache hits are not billed, inspect X-Billed in automated jobs when you are reconciling usage.

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

Start with 1,000 free screenshots a month with no card, then move to a paid plan starting at $5 for 3,000 shots if your volume requires it.

Best Value
Anker USB C Hub, 5-in-1 USBC to HDMI Splitter with 4K Display
  • 5-in-1 Connectivity: Equipped with a 4K HDMI port, a 5 Gbps USB-C data port, two 5 Gbps USB-A ports, and a USB C 100W PD-IN port. Note: The USB C 100W PD-IN port supports only charging and does not support data transfer devices such as headphones or speakers.
  • Powerful Pass-Through Charging: Supports up to 85W pass-through charging so you can power up your laptop while you use the hub. Note: Pass-through charging requires a charger (not included). Note: To achieve full power for iPad, we recommend using a 45W wall charger.
  • Transfer Files in Seconds: Move files to and from your laptop at speeds of up to 5 Gbps via the USB-C and USB-A data ports. Note: The USB C 5Gbps Data port does not support video output.
  • HD Display: Connect to the HDMI port to stream or mirror content to an external monitor in resolutions of up to 4K@30Hz. Note: The USB-C ports do not support video output.
  • What You Get: Anker 332 USB-C Hub (5-in-1), welcome guide, our worry-free 18-month warranty, and friendly customer service.

Playwright or a hosted API?

Consideration Playwright on your machine ScreenshotNeo
Setup Install Node, Playwright, and browser binaries. Send an authenticated GET request.
Control Direct control over browser engine, code, page actions, and local environment. Hosted controls for viewport, devices, waits, CSS/JavaScript, headers, cookies, blocking, formats, PDF, and more.
Scale You manage browser processes, concurrency, storage, and retries. Async jobs, signed webhooks, bulk capture of 100 URLs per call, and a usage API.
Noise removal You must handle consent banners, popups, and chat widgets in your script. Those elements are accepted or removed before capture, with each step switchable.
Failure cost Your infrastructure still spends time on a failed run. Bot checks, blank pages, timeouts, failed loads, and cache hits are not billed.
AI access You build your own integration. MCP tools are available for AI agents.

Choose Playwright when you need custom browser logic, local control, or a test environment that must match your own build. Choose ScreenshotNeo when you need repeatable URL-to-image or PDF requests without maintaining browser runtimes, especially for recurring, bulk, or agent-driven captures.

FAQ

Can I capture a page that requires credentials?

Yes, when the capture environment can authenticate. With Playwright, establish the required session or storage state before taking the screenshot. ScreenshotNeo supports custom cookies, headers, user agents, and an Authorization value; only send credentials to URLs and environments you control.

Can an AI agent request a PDF instead of an image?

Yes. ScreenshotNeo’s MCP server includes capture_pdf, while its HTTP API supports PDF output with paper size, margins, landscape mode, and page ranges.

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

Why is my screenshot different on another computer?

Browser version, operating system, fonts, hardware, power source, headless mode, viewport, and device scale can all affect rendering. Keep those variables fixed and control dynamic page content before treating a pixel difference as a code regression.

Frequently Asked Questions

Can I capture a page that requires credentials?

Yes. Establish a Playwright session first, or use ScreenshotNeo’s custom cookies, headers, user agent, and Authorization controls for a URL you are authorized to access.

Can an AI agent request a PDF instead of an image?

Yes. ScreenshotNeo’s MCP server provides the capture_pdf tool, and its API supports PDF paper size, margins, landscape mode, and page ranges.

Why is my screenshot different on another computer?

Rendering varies with browser and operating-system versions, fonts, hardware, headless mode, viewport, scale, and dynamic content. Keep those conditions consistent for comparisons.

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.