WebP vs PNG: which to use

Use WebP for images on a website, including ones with transparency, and PNG when you need exact pixels or a file that any program can open. Both support transparency. WebP can also compress lossily, which PNG cannot. In our test, screenshots averaged 509 KB as PNG and 109 KB as lossy WebP at quality 82.

WebP and PNG side by side

WebP compared with PNG.
WebPPNG
CompressionLossy or losslessLossless
TransparencyYesYes
AnimationYesNo
Browser supportSupported by every evergreen browser since 2020 (Chrome, Firefox, Safari 14+, Edge). Older systems and some editing tools still struggle.Universally supported in every browser since the late 1990s.
Kodak photo, 768×512, average sizemeasured63 KB626 KB
Photo 4000 px wide, average sizemeasured397 KB12.7 MB
Screenshot 2880×1800, average sizemeasured109 KB509 KB
Encode time, photo 4000 px widemeasured598 ms9.2 s
Decode time, photo 4000 px widemeasured43.6 ms116 ms

Measured rows: lossy formats at quality 82, which is the converter's default, in headless Chromium on one machine. Quality 82 is not the same visual quality in every format, and no quality metric was computed. Sizes are averages across each image set. Times are medians. PNG sizes are the source files. PNG times are for this site's PNG encoder, including its optimisation pass, and its decoder. Method and full results.

What WebP adds to PNG

PNG has one mode: lossless. WebP has a lossless mode and a lossy one, and both can carry an alpha channel. That means a logo with a transparent background, or a product photo cut out from its backdrop, can be stored lossily and still be transparent. PNG has no equivalent, and JPG has no transparency at all.

The figures on this page are for lossy WebP, because that is what the converter writes by default. We did not measure lossless WebP.

What we measured

Screenshots: lossy WebP was 79% smaller than the PNGs. Photographs: 90% smaller on the Kodak set and 97% smaller at 4000 pixels wide.

Lossy means not identical. Small text in a screenshot is slightly softened in the WebP. If the image is documentation, a UI reference or a source file, that can matter more than the saving.

When to use WebP, and when to use PNG

Use WebP when

  • The image is going on a web page.
  • You want transparency and a small file together.
  • A slightly inexact copy is acceptable.

Use PNG when

  • Every pixel has to be preserved.
  • The file is going into software that may not read WebP, such as older editors and office tools.
  • You are keeping a master copy to edit later.

Convert between them

These run in your browser. The file is not uploaded.

WebP vs PNG: common questions

Yes, in both its lossy and lossless modes.

Other format comparisons

Last updated