DriversRecommendedOutdated drivers can make a good PC feel brokenScan driver issues before chasing fixes manually.Scan NowOctober DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsWindows FixRecommendedWindows errors stealing your time? Find the fix fastScan stability, cleanup and performance issues.Fix Now×
Skip to content
World desk4 min

Convert a Webpage to a Transparent PNG with Headless Chrome

Capture a webpage as a transparent PNG with Puppeteer’s omitBackground option, then choose viewport, full-page or clipped bounds and troubleshoot page backgrounds.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Use Puppeteer’s page.screenshot() with omitBackground: true to capture a webpage as a transparent PNG. That removes Chrome’s default white canvas; it does not erase an opaque background the page itself paints. For a full-document capture add fullPage: true, or use clip to capture a region.

Capture a transparent PNG with Puppeteer

Puppeteer exposes the transparency option directly. Install Puppeteer in a Node.js project, save this as an ES module such as capture.mjs, and run it with Node.js. Replace the example URL with the page you need.

As an Amazon Associate I earn from qualifying purchases.

import puppeteer from 'puppeteer';

const browser = await puppeteer.launch({ headless: true });
try {
  const page = await browser.newPage();
  await page.goto('https://example.com', { waitUntil: 'networkidle2' });
  await page.screenshot({
    path: 'capture.png',
    type: 'png',
    omitBackground: true,
    // Add fullPage: true to capture the whole document.
  });
} finally {
  await browser.close();
}

The screenshot options are documented in the Puppeteer ScreenshotOptions reference. The type option is explicit here; PNG is Puppeteer’s default screenshot format. Puppeteer’s current Headless launch usage is documented in Chrome’s Headless mode guide.

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

Choose the capture bounds

  • fullPage: true requests a capture of the full document instead of only the current viewport. Its default is false.
  • Use clip in the screenshot options when you want to constrain the capture to a particular region.
  • Leave both options out for a viewport-sized screenshot.

See the Puppeteer API documentation for the available screenshot options and their current behavior.

#1 Best Overall
Imagd - Heic to Jpeg, Png Image Converter
  • 🖼️ A simple app that "just works".
  • 🖼️ No loss in details or image quality.
  • 🖼️ No more annoying ads or confusing user interface.
  • 🖼️ Convert an unlimited number of images for free at no hidden cost.
  • 🖼️ Click on the Add Images button at the bottom-right corner.

Wait for the page you actually need

The example uses waitUntil: 'networkidle2', a condition shown in Puppeteer’s screenshot guide. It is not a guarantee that every application has finished rendering: pages can continue updating after network activity settles. For a dynamic page, wait for a meaningful selector or application state before taking the screenshot. The right condition depends on the target page.

Why the PNG may still look opaque

omitBackground: true hides Chrome’s default white background and allows transparency; it does not remove backgrounds supplied by the webpage. If the resulting PNG still appears opaque, inspect the page’s CSS, especially the html and body backgrounds, and any element covering the capture area. The capture can be transparent only where the page itself leaves the canvas transparent.

Rank #2
Image Converter - JPG, PNG, PDF, WEBP, GIF, HEIC
  • Convert pictures in to batch mode and export jpeg, png, jpg or other image format
  • Photo size converter helps to compress and resize pictures in high quality
  • Jpeg converter easily converters multiple pictures in to other image format
  • Share images by reducing and compressing the image sizes by maintain quality
  • Choose compress level and reduce the image size to easily share pictures

Use Chrome’s command line for a simple screenshot

For a one-off viewport screenshot where transparency is not required, Chrome’s Headless CLI can save a PNG directly:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
chrome --headless --screenshot --window-size=412,892 https://example.com

Chrome saves screenshot.png in the current working directory. You can also set a maximum wait before capture with --timeout; Chrome documents that capture can occur when the timeout is reached even if the page is still loading. The CLI documentation describes screenshot output and viewport sizing, but does not document a transparency option. For transparent output, use Puppeteer’s omitBackground setting instead. See the Chrome Headless command-line reference.

Rank #3
JPG TO PNG IMAGE CONVERTER
  • - Save into Gallery all converted images
  • - Easy to share, delete converted JPG, JPEG and PNG images
  • - Choose image output format (jpeg, png, jpg).
  • - You can share directly from the view images in converted images and from converted gallery as well.
  • - JPG to PNG and PNG to JPG converter

Or skip the browser setup

ScreenshotNeo provides a screenshot API and MCP server for developers. One GET request returns an image or PDF; use format=png and transparent=true when configuring a PNG capture. See the ScreenshotNeo API documentation for the request options.

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

For this workflow, the useful differences are that ScreenshotNeo accepts cookie or consent banners and removes more than 60 known consent platforms, newsletter popups and chat widgets before capture; each step 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. Its MCP server exposes take_screenshot, get_page_info and capture_pdf for AI agents. The Free plan includes 1,000 screenshots a month with no card; paid plans start at $5 for 3,000 shots. Learn about ScreenshotNeo or sign up free for 1,000 screenshots a month, with no card required.

Troubleshoot common results

  • The image has a white background: Confirm that the capture uses PNG and omitBackground: true. If it does, check for an opaque page background rather than expecting Puppeteer to remove the site’s CSS.
  • The output contains only the visible viewport: Add fullPage: true for the document or use clip for a specific region.
  • Content is missing or mid-animation: A navigation wait condition alone may not match the page’s rendering behavior. Wait for the target selector or application state before capturing.
  • The CLI result is not transparent: The cited Chrome CLI screenshot reference does not document a transparency flag. Use Puppeteer’s screenshot API for this requirement.
  • The page is still loading at capture time: Revisit the navigation and application-state waits. If using Chrome CLI, --timeout is a maximum wait, not proof that loading has completed.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Performance and reliability considerations

Headless Chrome still has to navigate to and render the target page, so the capture reflects its loaded assets, authentication state, CSS and timing. A longer wait can help with pages that render late but also delays the capture; no single wait setting guarantees completion across sites. The supplied official documentation does not establish a universal speed or reliability figure, so test the wait condition and bounds against the actual page and workload.

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

Quick Recap

Bestseller No. 1
Imagd - Heic to Jpeg, Png Image Converter
Imagd - Heic to Jpeg, Png Image Converter
🖼️ A simple app that "just works".; 🖼️ No loss in details or image quality.; 🖼️ No more annoying ads or confusing user interface.
Bestseller No. 2
Image Converter - JPG, PNG, PDF, WEBP, GIF, HEIC
Image Converter - JPG, PNG, PDF, WEBP, GIF, HEIC
Convert pictures in to batch mode and export jpeg, png, jpg or other image format; Photo size converter helps to compress and resize pictures in high quality
Bestseller No. 3
JPG TO PNG IMAGE CONVERTER
JPG TO PNG IMAGE CONVERTER
- Save into Gallery all converted images; - Easy to share, delete converted JPG, JPEG and PNG images
$30.00
Bestseller No. 4
Image To PDF Converter, png jpg to pdf converter
Image To PDF Converter, png jpg to pdf converter
Key Features; Convert jpg to PDF; Convert jpeg to PDF; Convert PNG to PDF; Convert all images to PDF
Bestseller No. 5
Pixillion Image Converter Software for Mac- Convert Photo and Image File Formats [Download]
Pixillion Image Converter Software for Mac- Convert Photo and Image File Formats [Download]
Convert images to jpeg, gif, png, bmp, tiff and more; Rotate, resize and compress digital photos
$39.99
Best Value
Pixillion Image Converter Software for Mac- Convert Photo and Image File Formats [Download]
  • Convert images to jpeg, gif, png, bmp, tiff and more
  • Rotate, resize and compress digital photos
  • Easily add captions or watermarks to your images
  • Compress thousands of photos at a time with batch conversion
  • Convert images directly from the right-click menu
Rank #4
Image To PDF Converter, png jpg to pdf converter
  • Key Features
  • Convert jpg to PDF
  • Convert jpeg to PDF
  • Convert PNG to PDF
  • Convert all images to PDF

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.

Leave a Reply

Your email address will not be published. Required fields are marked *

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

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
Crashes, No Sound, or Screen Glitches?Free driver scan
Windows Errors? Fix Them Before They SpreadFree repair scan

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.