Free tools Windows power users keep installed
One-click scans. No signup required.
To convert HTML to PNG on a Mac, open the page in a browser and capture its rendered appearance. For a quick one-off, Chrome DevTools can capture the visible viewport or the full page. For repeatable captures, use Chrome Headless or Playwright. Safari can help you inspect the rendered page, but its Save As command saves a web archive or source—not a PNG.
Choose the right HTML-to-PNG method
A browser screenshot captures what the browser renders after applying CSS, running JavaScript, loading images and laying out the page. Saving an HTML file or its source code does not turn it into an image. The best method depends on whether you need a quick visual capture, a repeatable command, or a page rendered with a particular browser engine.
| Method | Best for | Capture scope | Setup |
|---|---|---|---|
| Chrome DevTools | Occasional capture with visual inspection | Viewport or full page | Chrome; no scripting |
| Safari and Web Inspector | Checking how a page renders in Safari before taking a screenshot | Screenshot workflow; Save As is not PNG export | Safari |
| Chrome Headless | Quick command-line screenshots | Configured viewport | Chrome and Terminal |
| Playwright | Repeatable automation, element capture, or WebKit rendering | Viewport, full page, or selected element | Node.js project and Playwright |
| wkhtmltoimage | Simple local-file or URL conversion where its rendering is compatible | Image of a page | Install the utility |
For modern sites, check the result for fonts, lazy-loaded images, animations, and content loaded from other origins. A screenshot tool can only capture what has rendered by the time the image is taken.
Use Chrome DevTools for a quick screenshot
Chrome DevTools is a straightforward choice when you want to open the page, inspect it, and capture it without writing code. Chrome documents both viewport and full-size screenshot capture. Chrome DevTools documentation
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
#1 Best Overall
- 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.
- Open the HTML file in Chrome, or navigate to the web page you want to capture.
- Open DevTools: choose View > Developer > Developer Tools, or use the keyboard shortcut shown for your Chrome and macOS setup.
- Open the DevTools command menu and search for Capture screenshot to capture the visible viewport, or Capture full size screenshot to capture the full scrollable document.
- Save the resulting PNG where you can find it. Inspect the image, especially at the bottom of a long page, to verify that the complete content rendered.
The viewport capture is appropriate when you want only what fits on screen. Full-size capture is useful for a whole-page reference, but a very long page can produce a tall image that is awkward to view or share. If the page uses lazy loading, scroll through it first so below-the-fold images have a chance to load.
Inspect in Safari, then capture the rendered page
Use Safari when the target is how a page appears in Apple’s browser. To inspect the rendered DOM and styles, enable the Develop menu in Safari’s settings if it is not already visible, then choose Develop > Show Web Inspector. The shortcut is Option-Command-I. Apple documents Web Inspector at Safari Developer Tools: Web Inspector.
Safari’s File > Save As saves a Web Archive or Page Source, not a PNG image. Apple’s Safari instructions describe those save formats. To get a PNG, use a screenshot workflow after checking the page in Safari—for example, capture the screen or window with macOS screenshot controls, then crop if needed. That approach captures the visible area; for a full-page image or automated capture, use a browser workflow with full-page support.
Capture a page from Terminal with Chrome Headless
Chrome Headless can write a screenshot without opening a visible browser window. Google’s documented example is:
Rank #2
- 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.
chrome --headless=new --screenshot --window-size=412,892 https://developer.chrome.com/
The --screenshot option saves the target page as screenshot.png in the current working directory. The example sets a 412-by-892-pixel browser window; replace the URL and dimensions to suit your page. See Chrome Headless documentation.
- Open Terminal and change to the directory where you want the PNG saved.
- Run the command using the Chrome executable available on your Mac. If the command name
chromeis not recognized, call the Chrome executable by its installed path or configure your shell’s PATH. - Replace the sample URL with your target URL. For a local HTML file, supply its file URL.
- Adjust
--window-size=WIDTH,HEIGHTto control the viewport and run the command. - Open
screenshot.pngand confirm the page finished loading and has the framing you wanted.
This is a viewport capture, so it does not guarantee a full-page image. If you need full-page capture, an element-only image, or more control over page readiness, Playwright is a better fit.
Automate screenshots with Playwright
Playwright’s Page API saves PNG screenshots, can capture the full page or an element, and supports browser engines including WebKit on macOS. The file extension determines the screenshot type when you do not specify one. See the Playwright screenshot guide and Page screenshot API.
Install Playwright in a project
With Node.js installed, create a project and add Playwright:
The Tool Desk
Outbyte PC Repair FREEClear out junk files and repair common Windows errorsFree Scan →Outbyte Driver Updater FREEScan for outdated or missing drivers - takes under a minuteDriver Scan →Rank #3
- 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.
mkdir html-to-png
cd html-to-png
npm init -y
npm install playwright
npx playwright install chromium
Save the following as capture.js. Pass a web URL or a local HTML file URL as the first argument:
const { chromium } = require('playwright');
const { pathToFileURL } = require('node:url');
const path = require('node:path');
(async () => {
const input = process.argv[2];
if (!input) {
throw new Error('Usage: node capture.js <URL-or-local-HTML-path>');
}
const url = /^[a-zA-Z][a-zA-Zd+.-]*:/.test(input)
? input
: pathToFileURL(path.resolve(input)).href;
const browser = await chromium.launch();
const page = await browser.newPage({ viewport: { width: 1440, height: 900 } });
try {
await page.goto(url, { waitUntil: 'networkidle', timeout: 60000 });
await page.screenshot({ path: 'screenshot.png', fullPage: true });
} finally {
await browser.close();
}
})().catch(error => {
console.error(error);
process.exitCode = 1;
});
Run it with a web URL or local file path:
node capture.js https://example.com
node capture.js ./index.html
The script waits for network activity to settle, then writes a full-page PNG to screenshot.png. Some sites keep connections open or continually fetch data, in which case networkidle may time out. If that happens, wait for a page-specific selector or use an intentional delay instead of assuming every site reaches network idle.
Capture only an element
To save one element instead of the whole page, replace the screenshot line with a locator screenshot. Choose a selector that uniquely identifies the part you need:
await page.locator('.receipt').screenshot({ path: 'receipt.png' });
For a viewport-only capture, omit fullPage: true. To use WebKit instead of Chromium, install it with npx playwright install webkit and launch with const { webkit } = require('playwright'); followed by await webkit.launch(). This is useful when Safari-like rendering matters, though it is still worth comparing the output with the actual target environment.
Recommended Free Tools
Rank #4
- 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
Convert with wkhtmltoimage when the page is simple
wkhtmltoimage is a command-line utility that converts a URL or local HTML document to an image, and its project README includes macOS use and examples such as:
wkhtmltoimage https://example.com output.jpg
For a local page, provide the HTML file as the input and a PNG filename as the output, for example wkhtmltoimage ./index.html output.png. Check the result against the target page: this utility may not render modern JavaScript or CSS the same way a current browser does. Use Chrome or Playwright if the page depends on contemporary browser features or precise browser fidelity. See the wkhtmltoimage project README.
Or skip the browser setup
If you need a screenshot from a URL without installing or maintaining a local browser workflow, ScreenshotNeo is a website screenshot API and MCP server. Its GET endpoint returns an image or PDF, and the call below requests WebP output:
ScreenshotNeo API documentation
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://example.com -o shot.webp
Before capture, it accepts cookie or consent banners and removes more than 60 known consent platforms, newsletter popups, and chat widgets; each of those steps can be turned off. Bot checks or CAPTCHAs, blank pages, timeouts, failed loads, and cache hits are not billed, and the response identifies the page verdict and billing status in headers. Its MCP server gives AI agents tools to take screenshots, get page information, and capture PDFs. The free plan includes 1,000 screenshots per month with no card; paid plans start at $5 for 3,000 screenshots. Sign up for ScreenshotNeo’s free plan.
Troubleshoot common capture problems
- The PNG is blank or mostly empty: The page may not have loaded before the capture, may require JavaScript, or may be showing a bot check. Wait for a visible page-specific element, check the page in a browser, and confirm that the URL works from your Mac.
- Images are missing near the bottom: The page may load images only when they approach the viewport. Scroll through the page before a manual full-page capture, or use a workflow that loads content before taking the screenshot.
- Fonts or spacing differ from the browser: Check that the fonts and external assets loaded. A local HTML file may refer to relative paths that break when opened from another directory; use valid relative paths or absolute file URLs.
- Chrome Headless says the command is not found: Chrome may not be on PATH under the name
chrome. Run the installed Chrome executable by its full path or adjust PATH, then retry. - Playwright times out waiting for network idle: Some pages keep polling or streaming. Replace the network-idle wait with a selector wait for the content you need, or use a short, deliberate delay.
- The full-page image is too tall or clipped: Use a viewport capture if a single screen is sufficient, or capture sections separately. Confirm that sticky headers, fixed elements, and page-specific layout behave as expected in a full-page image.
- The output is JPEG rather than PNG: For Playwright, use a
.pngfilename or specifytype: 'png'. For command-line utilities, choose a PNG output filename and verify the tool’s output format.
Keep output and performance in mind
Image dimensions follow the capture area: a wider viewport changes responsive layout, and a full-page image grows with document height. Large pages can therefore create large files and take longer to render and inspect. Pick viewport dimensions that match the use case, avoid full-page capture when only the visible screen matters, and make sure animations or rotating content have settled when a consistent result is important.
Best Value
- 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.
For recurring jobs, a browser automation script is more reproducible than manual screenshots because viewport, browser engine, and capture scope can be specified. It still depends on the target site’s load behavior and available resources; use sensible timeouts and close the browser even when a capture fails. A service can reduce local browser setup, but consider its plan and billing rules against your expected volume before relying on it.
Frequently Asked Questions
Can I save a Safari webpage directly as a PNG?
No. Safari’s Save As formats are Web Archive and Page Source. Use a screenshot workflow for PNG.
Can I convert a local HTML file with Playwright?
Yes. Pass the file path to the included script; it converts the path to a file URL before loading it.
Do these 3 things before closing this tab:
1Fix the driver behind crashes, sound loss and screen glitches2Repair Windows errors before they cause bigger problems3Scan for outdated or missing drivers - takes under a minuteWhich method supports a full-page PNG?
Chrome DevTools offers Capture full size screenshot, and Playwright supports full-page screenshots with fullPage: true.
Quick Recap
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.

