Formats
WebP vs PNG: what actually differs, and how much it costs
The two formats people mix up most. One throws detail away on purpose; the other writes every pixel down. The gap between them is a factor of five to twenty.
At a glance
- WebP is a lossy-first format that can also store losslessly; PNG is always lossless. That single design choice explains almost every practical difference.
- Same picture, both formats: our measured PNG outputs were 7.3x to 18.2x the size of the source WebP, depending on image type.
- WebP supports transparency and animation; PNG supports transparency and animation too, but WebP stores the alpha channel with lossy compression available for it.
- Support is no longer the deciding factor: WebP is effectively universal, so the choice is about the destination's acceptance and the quality budget, not compatibility.
One design decision explains everything
WebP comes from the same lineage as JPEG and video codecs: it works in blocks, transforms them into frequency components, and quantises those components according to a quality setting. What the quantiser discards is gone. PNG does the opposite — it filters scanlines and compresses them with DEFLATE, and every pixel value survives intact.
That difference is not a detail; it is the whole story. Everything else — file size, suitability per content type, editing behaviour, how many conversions a file can survive — follows from it.
The measured cost of going lossless
Our published benchmark encoded the same six test images to each format. Comparing a PNG output against the lossy WebP of the same picture:
| Image type | WebP source, q80 | PNG output | Ratio |
|---|---|---|---|
| Photo-like texture | 60.7 KB | 1,106.8 KB | 18.2x |
| Product cutout (RGBA) | 25.0 KB | 401.5 KB | 16.1x |
| Smooth gradient | 9.3 KB | 136.9 KB | 14.7x |
| Logo (RGBA) | 7.9 KB | 70.3 KB | 8.9x |
| Flat illustration | 24.7 KB | 190.2 KB | 7.7x |
| UI screenshot | 157.7 KB | 1,157.2 KB | 7.3x |
The multiplier is smallest where the content is already cheap to describe — flat colours and text — and largest on photographic texture, where the lossy encoder was discarding a lot and PNG has to carry it all.
Two conclusions worth stating plainly: switching to PNG never makes an image better than the WebP it came from, because the discarded frequencies are not recoverable. And the multiplier is not a defect of PNG; it is the price of exactly reproducing pixels that a lossy encoder chose not to keep.
Where each format wins
| Situation | Better choice | Why |
|---|---|---|
| Photograph on a web page | WebP (or JPEG) | Lossy compression discards what the eye ignores |
| Screenshot, UI, text-heavy image | PNG | Text edges are where lossy formats produce blocking and ringing |
| Logo or icon with transparency | Either — WebP lossless is usually smaller | Both store alpha; WebP's lossless mode often wins on flat art |
| Image that will be edited repeatedly | PNG | No generation loss between passes |
| Destination that rejects WebP | PNG or JPEG | Still a real constraint on print and older toolchains |
| Archival master | PNG or another lossless format | Reproducibility over bytes |
The screenshot row of our measurements makes the text case concrete: a 1920 x 1080 UI capture stored as JPEG grew from 170.9 KB at q40 to 752 KB at q95 while its PSNR stayed flat at 26.7 dB. Four times the bytes bought almost nothing measurable. The same image as PNG — flat fills, few colours, text — is the case where lossless compression is close to its best.
Transparency, animation and the fine print
Transparency. Both formats carry an alpha channel. WebP can compress alpha lossily as well, which means a transparent WebP can have slightly imprecise edge values; PNG's alpha is exact. Our tests confirmed PNG preserved every transparent pixel through conversion, with no pixel off by more than 1/255.
Animation. Both animate — WebP through an animated container, PNG through APNG, which is part of the current specification. A still-image pipeline that encounters an animated WebP will expose only the first frame, which is worth knowing before converting a file you assumed was static.
Support. WebP decoding is effectively universal across current browsers and platforms; the practical constraints are older desktop applications, some upload pipelines and print workflows. When a destination accepts WebP, keeping the file usually saves most of the bytes. When it does not, the conversion is a necessity rather than an improvement.
What happens during a conversion
Converting WebP to PNG decodes the WebP and stores the result losslessly. The pixels you get are exactly the pixels WebP decoded to — including whatever the lossy encoder had already approximated. The output is typically several times larger and identical in appearance.
Converting in the other direction, PNG to lossy WebP, discards detail the PNG had kept. It is a legitimate size decision for photographs and a poor one for text: the same reasons that make JPEG bad at text apply, since the underlying transform is the same family.
The practical rule: check what the destination accepts, and only then decide. If it accepts both, choose by content type — lossy for photographs, lossless for text and flat graphics. If it accepts only PNG, convert and accept the size, or reduce the pixel dimensions first so the lossless file stays manageable.
Sources
- W3C, PNG Specification (Third Edition) — https://www.w3.org/TR/png-3/
- Google, WebP compression documentation — https://developers.google.com/speed/webp/docs/compression
- File-size multipliers measured on 22 October 2026 with Pillow 11.0.0; the corpus and raw CSV are published at ./assets/bench/
Convert WebP files to PNG or JPG — in your browser
Batch conversion, ZIP download, transparency kept. No upload.