Free tools Windows power users keep installed
One-click scans. No signup required.
Use Puppeteer to open the local file through a properly formed file:// URL, then save the page with page.screenshot(). This runnable Node.js example captures the full page as a PNG:
import puppeteer from 'puppeteer';
import { pathToFileURL } from 'node:url';
import { resolve } from 'node:path';
const browser = await puppeteer.launch();
try {
const page = await browser.newPage();
await page.setViewport({ width: 1280, height: 800 });
const localHtmlUrl = pathToFileURL(resolve('./index.html')).href;
await page.goto(localHtmlUrl);
await page.screenshot({ path: 'screenshot.png', fullPage: true });
} finally {
await browser.close();
}
Install Puppeteer in your Node.js project first, following the official getting-started guide. The example assumes index.html is in the process’s current working directory. Change that path to your file.
As an Amazon Associate I earn from qualifying purchases.
Why convert the file path to a URL?
page.goto() navigates to a URL, and Puppeteer’s API requires the URL to include a scheme. pathToFileURL() converts a filesystem path into a suitable URL and handles URL-sensitive characters that can break a manually assembled file:// string. The Page.goto() reference documents navigation, and Node.js documents pathToFileURL in its URL API.
The Tool Desk
Outbyte Driver Updater FREEFix the driver behind crashes, sound loss and screen glitchesFind Drivers →Outbyte PC Repair FREEClear out junk files and repair common Windows errorsFree Scan →Choose the capture size and output
Viewport screenshot
Omit fullPage to capture the visible viewport. Set its dimensions with page.setViewport() before navigating or capturing when you need predictable output dimensions.
#1 Best Overall
Full-page screenshot
Set fullPage: true to capture content beyond the viewport. It is false by default. Puppeteer’s ScreenshotOptions reference documents this and other capture settings.
File name and format
The path option saves the image to disk. A relative path such as screenshot.png is resolved from Node.js’s current working directory, which may differ from the HTML file’s directory. Use an absolute output path if the destination must be unambiguous. The extension determines the format unless you explicitly set a type; PNG is the default. See the ScreenshotOptions reference.
Rank #2
Use an HTML string instead of a file
If your input is already an HTML string, use page.setContent(html) rather than navigating to a file URL:
const html = '<!doctype html><html><body><h1>Hello</h1></body></html>';
await page.setContent(html);
await page.screenshot({ path: 'screenshot.png' });
The Page.setContent() API documents this method. It does not, by itself, establish how external local assets such as stylesheets, images, fonts, or scripts will resolve; verify those assets in your runtime.
Wait for JavaScript-rendered content
If the page adds content asynchronously, wait for a condition that signals the part you need is ready before calling page.screenshot(). For example, if the page renders a result element with a stable selector:
await page.goto(localHtmlUrl);
await page.waitForSelector('#rendered-result');
await page.screenshot({ path: 'screenshot.png', fullPage: true });
Choose a selector that appears only when the desired content is ready. There is no universal readiness rule for every local page; a fixed delay is less reliable than waiting for a page-specific signal when one exists.
Rank #4
Troubleshoot blank, incomplete, or misplaced captures
- Blank or incomplete image: check that navigation has completed and that the expected CSS, images, fonts, and scripts loaded. Local-file access behavior can depend on the runtime and environment, so check the browser output and verify each referenced asset.
- Content appears late or is missing: wait for the page-specific selector or other readiness signal before capturing.
- Image has the wrong dimensions: set the viewport explicitly; use
fullPage: trueif you need content below the visible area. - Image is saved in the wrong folder: remember that a relative screenshot path starts at the Node.js process’s current working directory. Supply an absolute path to control the destination.
- Paths with spaces or special characters fail: pass the filesystem path through
pathToFileURL()instead of building the URL by concatenating strings.
Or skip the browser setup
For a publicly reachable web page, ScreenshotNeo can return a screenshot with one GET request. This example saves the response as WebP:
Quick Recap
Best Value
- Used Book in Good Condition
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp
See the ScreenshotNeo documentation for the API details. ScreenshotNeo accepts cookie and consent banners and removes more than 60 known consent platforms, newsletter popups, and chat widgets before capture; those steps can be turned off. Bot checks, blank pages, timeouts, failed loads, and cache hits are not billed, and response headers report the page verdict and billing status. Its MCP server offers screenshot and PDF tools for AI agents. The free plan includes 1,000 screenshots per month with no card; paid plans start at $5 for 3,000 screenshots. A local file on your computer is not a publicly reachable URL, so this API example is for a page accessible to the service, not a replacement for Puppeteer on a private local file. Sign up for 1,000 free screenshots a month, with no card required.
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.

