1. Home
  2. Blog
  3. WebP vs PNG: which is smaller, and when should you use each?
Guide

WebP vs PNG: which is smaller, and when should you use each?

Cover image for: WebP vs PNG: which is smaller, and when should you use each?

The short answer: WebP is smaller than PNG in most cases, often by a wide margin, but how much depends on two choices you may not know you are making: lossy or lossless, and which encoder made the file. We measured both on six kinds of image so you do not have to guess.

How we tested

We took six sets of images, each saved as a normal PNG: five photographs, two website screenshots, a text-heavy page, a bar chart, and a logo with a transparent background and a soft shadow. Every one went through ConvertPicto's PNG to WebP converter in headless Chromium at 85% quality (lossy) and at 100% (lossless). To check the browser's results against a dedicated encoder, we also saved each image as lossless WebP with libwebp, the reference WebP encoder, and re-saved each PNG with PNG optimisation switched on. Lossless outputs were compared pixel by pixel with the original. Lossy outputs were scored with SSIM, where 1.000 means identical.

Lossy WebP (85%) vs PNG

ImagePNGWebP 85%WebP vs PNGSimilarity (SSIM)
Photos (5, combined)2,997 KB320 KB89% smaller0.939
Home-page screenshot292 KB58 KB80% smaller0.987
Tool-page screenshot124 KB40 KB68% smaller0.994
Text-heavy page234 KB121 KB48% smaller0.988
Bar chart21 KB12 KB45% smaller0.982
Transparent logo13 KB14 KB7% larger0.965

For photographs and screenshots lossy WebP is dramatically smaller. The five photos went from 2,997 KB to 320 KB, which is 89% smaller, and the home-page screenshot dropped 80%. The small logo is the exception: it is so simple that PNG already stores it efficiently, and lossy WebP came out slightly larger. The price of lossy WebP is that it changes pixels, which shows in the scores: the text page and the chart stay close to the original, but nothing is bit-for-bit identical.

Lossless WebP vs PNG: the encoder matters

If you need the picture to stay exactly the same, you compare PNG with lossless WebP. Here our results were surprising.

ImagePNGPNG optimisedWebP lossless (browser's encoder)WebP lossless (libwebp)
Photos (5, combined)2,997 KB2,925 KB2,626 KB2,449 KB
Home-page screenshot292 KB273 KB310 KB197 KB
Tool-page screenshot124 KB126 KB151 KB76 KB
Text-heavy page234 KB241 KB280 KB76 KB
Bar chart21 KB21 KB90 KB5.2 KB
Transparent logo13 KB10 KB16 KB5.6 KB

Both WebP columns reproduce the original's opaque pixels exactly. The difference is size. The browser's built-in encoder gave lossless WebP files that were larger than the PNG for the screenshots, the text page, the chart and the logo. The chart, for example, grew from 21 KB to 90 KB. The photographs did shrink, to 2,626 KB from 2,997 KB. libwebp gave a very different picture: the chart came out at 5.2 KB (76% smaller than the PNG), the text page at 76 KB (67% smaller), the tool-page screenshot 39% smaller and the logo 56% smaller. Photographs, which are already hard to compress without losing detail, shrank by 18%.

We measured the output, not the reason. The likely explanation is that a browser prefers speed over squeezing out every byte. The practical lesson is that "WebP is smaller than PNG" is reliably true for lossy WebP, and for lossless WebP only if the tool uses a strong encoder.

A correction on our own tool. When we first ran this test, ConvertPicto's PNG to WebP converter used the browser's encoder at 100% quality, so it produced the larger files in the fourth column. We have since switched 100% quality to libwebp, compiled to WebAssembly and run inside your browser, so nothing is uploaded. The libwebp column is what the converter now produces, measured through the real page. We use libwebp's balanced effort setting, which takes about a second on these images. Its maximum-effort setting saved a further 14% on the home-page screenshot, but took 6 to 10 times longer on the screenshots and photos we timed it on, so we did not make it the default.

Transparency

Both formats support transparency, and WebP kept the alpha channel intact in every test: for the logo it matched the original at 100%, 85% and 75% quality. One caveat applies to any browser-based converter, ours included. Browsers store canvas colours premultiplied by alpha, so a partly transparent pixel can shift by a level or two; in a separate test, half-transparent pixels differed by at most 1 level out of 255, and opaque pixels were identical. At 85% the colours shifted slightly (SSIM 0.965), which is the usual lossy trade-off, so for logos and icons where exact colours matter, use lossless WebP or keep the PNG.

So which should you use?

SituationPickWhy
Photo on a web pageLossy WebP, 80% to 85%About 89% smaller than PNG in our test
Screenshot or interface imageLossy WebP, 85%About 80% smaller on our screenshot
Logo, icon or chart that must stay exactLossless WebP from a strong encoder, or PNGlibwebp was 76% smaller than PNG on our chart
Text-heavy imageLossless WebP from a strong encoder, or PNGLossy WebP blurs small text; lossless libwebp was 67% smaller than PNG
You need the widest compatibilityPNGSome older apps still cannot open WebP
Transparent image for the webWebP or PNGBoth keep the alpha channel

If you already have WebP files and need PNGs for an app that cannot open them, our WebP to PNG converter does that in your browser, and our guide to what a WebP file is and how to open one covers the rest. For a wider comparison that includes JPG, see PNG vs JPG vs WebP, measured.

Limits of this test

Six image types is a sample, not a survey, and a different photo or screenshot will give different percentages. We tested one browser encoder and one full-effort encoder. We did not test AVIF, animated WebP, or the effect of different quality settings in this article; the JPG vs WebP quality measurements cover the quality slider.

Convert PNG to WebPConvert Portable Network Graphics to WebP — free, no upload
Convert WebP to PNGConvert WebP to PNG — free, no upload
Compress a PNGReduce PNG file size — free, no upload

Tools mentioned in this article

More from the blog

How to fix grainy photos, and how much a free filter really helps
Grain comes from too little light, not a bad camera. How to prevent it, how to reduce it for free in your browser, and what a simple filter can and cannot do.
5 min read
How to compress an image to 20, 50 or 100 KB (and what you lose)
Tested on real photos: what a 20, 50, 100, 200 or 500 KB limit does to quality and dimensions, and how to avoid a blurry result.
5 min read
We checked all 28 image conversions pixel by pixel
28 conversions, each run in headless Chromium and compared against an independent decoder. What is identical, what is lossy, and why.
4 min read
How big will your image PDF be? We measured it
Page size does not change the file size, but quality does, a lot. Measured PDF sizes from JPG and PNG sources.
4 min read
JPG vs WebP quality settings: what each level really costs in file size
Nine quality settings, two formats, five photos, measured. Where the file-size curve is gentle, and where it falls off a cliff.
4 min read
PNG vs JPG vs WebP: what we measured on photos, screenshots, text and charts
There is no best format, only a best format for each kind of image. Measured sizes and quality scores for photos, screenshots, text and charts.
4 min read
Resize or compress first? Measuring what actually shrinks an image
Image size scales with pixel count, so resizing beats lowering quality. Here are the measured numbers, and the order that works best.
4 min read
Writing a real PNG compressor in vanilla JavaScript (no WASM, no libraries)
Median-cut quantization, Floyd–Steinberg dithering, hand-built PNG chunks, and the four browser traps that cost me an evening each.
6 min read
Are online image converters safe? What actually happens to your files
Most converters upload your file to a server you know nothing about. Here's how to tell which ones do, and when it actually matters.
6 min read
JPG vs PNG vs WebP vs AVIF: which image format should you use?
Five formats, one decision. Here's what each one is actually good at, with a rule of thumb you can apply in ten seconds.
6 min read
How to combine multiple images into one PDF
Every method, on every device — plus the page-size and quality settings that decide whether your PDF is 200 KB or 20 MB.
6 min read
How to make a favicon: every size and format you actually need
Which sizes you actually need, the exact HTML to paste, and the three reasons a favicon usually fails to appear.
6 min read
How to reduce image file size without losing quality
Do these three things in the right order and a 4 MB photo becomes 80 KB with no visible difference. The order matters more than the tools.
6 min read
What is a WebP file, and how do you open one?
Why the internet keeps giving you files you can't open, how to open them anyway, and when WebP is actually the right choice.
6 min read