← All articles 9 min read

How to Convert PNG to WebP (Lossless and Lossy Methods)

PNG is reliable and widely supported, but it is not small. A lossless WebP encodes the same pixel data 25–30% more efficiently. Lossy WebP, applied to photos, can cut file size by up to 80%. WebP has had 97%+ browser support since 2023, supports full alpha transparency, and Google's own Core Web Vitals guidance calls it out as the preferred format for web images.

If you are serving PNGs on a website, you are almost certainly paying an unnecessary performance tax. This guide covers every practical way to fix that — browser tool, desktop app, and command line.


Quick Method Comparison

Method Steps Best For
Pixotter /convert/ Drop → select WebP → download Any workflow, batch, no install
IrfanView 4.67 (Windows) Open → Save As → WebP Desktop, single files
Paint.NET 5.x (Windows) Open → Save As → WebP Desktop, quality control
Preview / Finder (macOS Sonoma+) Export → Format: WebP Quick one-off on Mac
cwebp 1.4.x (CLI) cwebp input.png -o output.webp Scripting, fine-grained quality control
ImageMagick 7.1.x (CLI) magick input.png output.webp Batch scripts, pipeline automation
FFmpeg 7.x (CLI) ffmpeg -i input.png output.webp Video/image pipelines
Python Pillow 10.x img.save('output.webp') Python scripts and apps

Convert PNG to WebP Online — Pixotter Method

Pixotter's format converter runs entirely in your browser using WebAssembly. Your files never leave your machine. There is no upload size limit imposed by a server, and no queue. It is fast because the processing happens locally on your CPU.

Steps:

  1. Open pixotter.com/convert/.
  2. Drag and drop your PNG files onto the drop zone — or click to select them. Batch conversion is supported: drop as many as you need.
  3. In the output format selector, choose WebP.
  4. Choose Lossless to preserve every pixel (good for screenshots, logos, graphics with text), or Lossy and set a quality level (75–85 is a good starting point for photos).
  5. Click Convert. Processing takes a second or two per file.
  6. Download your WebP file, or download all as a zip if you converted in batch.

That is the whole workflow. No account, no upload, no waiting.


Convert PNG to WebP on Windows

IrfanView 4.67 (License: GPL)

IrfanView is a fast, lightweight image viewer that handles WebP natively as of version 4.67.

  1. Download IrfanView from irfanview.com and install the Plugins package alongside it (the WebP support lives in the plugins DLL).
  2. Open your PNG: File → Open.
  3. File → Save As (or press S).
  4. In the "Save as type" dropdown, select WebP — WebP Format.
  5. Click Options to set quality (for lossy) or enable lossless mode.
  6. Click Save.

For batch conversion: File → Batch Conversion/Rename, add your PNG files, set output format to WebP, and run.

Paint.NET 5.x with WebP Plugin (License: MIT)

Paint.NET 5.x does not ship with WebP support built in, but the community plugin adds it cleanly.

  1. Install Paint.NET (5.x recommended).
  2. Install the WebP FileType Plus plugin — download the release zip, place the DLL in Paint.NET's FileTypes folder, restart Paint.NET.
  3. Open your PNG: File → Open.
  4. File → Save As, choose WebP from the format list.
  5. The save dialog shows a quality slider (0–100) and a lossless checkbox. For graphics with text or transparency, tick lossless. For photos, leave lossless unchecked and set quality to 80–90.
  6. Save.

Convert PNG to WebP on Mac

macOS Sonoma and Later — Finder Quick Actions

Starting with macOS Sonoma (14.0), the Finder ships with a built-in WebP conversion Quick Action.

  1. Select one or more PNG files in Finder.
  2. Right-click → Quick Actions → Convert Image.
  3. In the sheet that appears, set Format to WebP.
  4. Click Convert to WebP.

The converted files appear alongside the originals. Quality settings are not exposed in this UI — it uses system defaults.

macOS Ventura and Earlier — Use Preview for Export (with a Caveat)

Preview does not natively export WebP on macOS Ventura or earlier. Your options:

If you are on Ventura or earlier and need a local tool, cwebp via Homebrew is the cleanest path.


Convert PNG to WebP with CLI Tools

Command-line tools are the right choice when you need to automate conversion, process hundreds of files, or integrate WebP output into a build pipeline.

cwebp — Google's Reference Encoder (License: BSD 3-Clause)

libwebp version: 1.4.0 (current stable as of early 2026)

# Install on macOS via Homebrew
brew install webp

# Install on Ubuntu/Debian
sudo apt install webp

# Basic lossy conversion (default quality: 75)
cwebp input.png -o output.webp

# Lossy with explicit quality (0–100; 80 is a good default)
cwebp -q 80 input.png -o output.webp

# Lossless conversion — preserves every pixel
cwebp -lossless input.png -o output.webp

# Batch: convert all PNGs in a directory (bash)
for f in *.png; do cwebp -q 80 "$f" -o "${f%.png}.webp"; done

cwebp gives you the most control over the encoding. The -q flag sets lossy quality. -lossless overrides quality and encodes losslessly. -z (0–9) controls the lossless compression effort — higher is slower but smaller.

ImageMagick 7.1.x (License: Apache 2.0)

Version: 7.1.1 (use magick --version to confirm — ImageMagick 6 uses a different binary name).

# Install on macOS
brew install imagemagick

# Install on Ubuntu/Debian
sudo apt install imagemagick

# Basic conversion
magick input.png output.webp

# Set quality (lossy)
magick -quality 85 input.png output.webp

# Lossless
magick input.png -define webp:lossless=true output.webp

# Batch: all PNGs in a directory
magick mogrify -format webp -quality 80 *.png

ImageMagick is especially useful when PNG→WebP is one step in a larger pipeline that also resizes, crops, or applies other transforms.

FFmpeg 7.x (License: LGPL 2.1+ / GPL 2+ depending on build)

Version: 7.0 (use ffmpeg -version to confirm).

# Install on macOS
brew install ffmpeg

# Install on Ubuntu/Debian
sudo apt install ffmpeg

# Basic conversion
ffmpeg -i input.png output.webp

# Set quality (lossy; scale: 0–100, higher = better)
ffmpeg -i input.png -quality 80 output.webp

# Lossless
ffmpeg -i input.png -lossless 1 output.webp

FFmpeg is a natural fit if you are already using it for video work or if PNG→WebP is part of a media processing pipeline.

Python Pillow 10.x (License: HPND — Historical Permission Notice and Disclaimer)

Version: 10.3.0 (use pip show Pillow to confirm).

pip install Pillow
from PIL import Image

img = Image.open("input.png")

# Lossy WebP
img.save("output.webp", quality=80)

# Lossless WebP — preserves every pixel
img.save("output.webp", lossless=True)

# Lossless with compression effort (0–6, higher = smaller file, slower)
img.save("output.webp", lossless=True, method=6)

For batch conversion in Python:

from pathlib import Path
from PIL import Image

for png in Path(".").glob("*.png"):
    img = Image.open(png)
    img.save(png.with_suffix(".webp"), lossless=True)

Pillow preserves the alpha channel in both lossy and lossless WebP output. No special handling required.


Lossless vs Lossy WebP — Which Should You Choose?

The right mode depends on what is in the PNG.

Choose lossless when:

Lossless WebP is typically 25–30% smaller than an equivalent PNG. That is a meaningful win with zero quality cost.

Choose lossy when:

Lossy WebP at quality 80–85 is typically 60–80% smaller than the equivalent PNG, and visually indistinguishable from the original on most monitors and viewing distances.

If you are unsure, start with lossless — you get a meaningful size reduction with zero perceptual risk. If the file is still too large and the image is photographic, switch to lossy at quality 80 and compare visually.

For a deeper comparison of the two formats, see PNG vs WebP: Which Should You Use? and the broader explanation in Lossy vs Lossless Compression. If you also need to convert images between other formats — for example, converting PNG to PDF for document workflows, or converting JPG to PDF — Pixotter's format converter handles those in the same tool.


Does WebP Support Transparency?

Yes — both lossless and lossy WebP support alpha transparency. This is one of WebP's strongest advantages over JPEG.

PNG is often chosen specifically because JPEG has no alpha channel. WebP handles transparency as well as PNG but in a smaller file — especially in lossless mode. A transparent PNG converted to lossless WebP typically shrinks 25–30% with zero visible change to the transparency.

In lossy WebP, the alpha channel is encoded separately from the RGB data, and you can control the quality of each independently. Most tools default to high-quality alpha even at low overall quality settings.

For logos, icons, product cutouts, and any graphic with a transparent background, WebP is the correct web format. Use PNG only if you need compatibility with software or contexts that do not support WebP.

Want to understand the full picture? See What Is WebP? for a format overview and Best Image Format for Web to see how WebP compares across use cases.



Frequently Asked Questions

Does converting PNG to WebP reduce quality?

It depends on the mode. Lossless WebP encodes the same pixel data as the PNG — there is no quality reduction, only a more efficient compression algorithm. Lossy WebP does discard some image detail to achieve smaller files. For photographs at quality 80+, the difference is typically invisible at normal viewing sizes. For screenshots, icons, and text-heavy images, use lossless to avoid visible artifacts.

Will WebP work in all browsers?

As of 2026, WebP is supported by 97%+ of browsers globally — including Chrome, Firefox, Safari (since version 14), Edge, and all major mobile browsers. If you need to support very old Safari or Internet Explorer, keep a PNG fallback and use the <picture> element. For nearly all modern web projects, you can serve WebP without a fallback.

Does converting PNG to WebP remove the background transparency?

No — both lossless and lossy WebP support full alpha channel transparency. Your transparent PNG will convert to a transparent WebP with the alpha data intact. If the transparency disappears, check that your tool is not converting to JPEG by mistake, or that you have not set a background fill option.

What quality setting should I use for lossy WebP?

Start at 80. Compare the output against the original at your target display size. If you cannot see a difference, try dropping to 75. For most photos served on the web, 75–85 produces files that are 50–80% smaller than the PNG with no visible quality loss. For images with text or fine detail, use lossless mode instead.

Can I convert WebP back to PNG?

Yes. If you need the original PNG format — for editing in software that does not support WebP, or for print — you can reverse the conversion. See How to Convert WebP to PNG for all methods. Note that if you converted with lossy mode, some data was discarded — the resulting PNG will be a lossless copy of the lossy WebP, not identical to the original PNG.

How much smaller will my WebP file be?

It depends on the source image and the encoding mode. Lossless WebP is typically 25–30% smaller than the equivalent PNG. Lossy WebP applied to photographs is typically 50–80% smaller than the PNG. Solid-color graphics and simple illustrations compress differently — results vary. The only way to know exactly is to convert a representative sample and measure. Pixotter's converter shows the file size before and after so you can see the reduction immediately.

Also try: Compress Images