PNG vs WebP: which should you use?

A direct answer, a property comparison, measured file sizes and when to pick each format.

Short answer: PNG or WebP?

Use PNG when you need a lossless image that opens in every program, such as a master copy, a logo you send to others or a screenshot for documentation. Use WebP on the web, where its lossless mode can produce a smaller file than PNG for the same pixels and its lossy mode makes photographs and graphics smaller still, at the cost of some detail.

PNG and WebP compared

PropertyPNGWebP
CompressionLosslessLossy or lossless
TransparencyYesYes
AnimationNoYes
File extensions.png.webp
MIME typesimage/pngimage/webp
Developed byPNG Development GroupGoogle
First released19962010
What opens itPNG opens in every web browser and image viewer, in Windows Photos, macOS Preview, and in editors from Paint to Photoshop and GIMP.WebP opens in current Chrome, Firefox, Edge and Safari (from Safari 14), on Android, and in editors such as GIMP and recent versions of Photoshop.

Measured file sizes

These are file sizes we measured with NexMedia's own conversion engines, not estimates. In our test of 4 images, every file was converted at NexMedia's default settings, and each cell is the size of the file the converter produced.

Output size of each sample image
SamplePNG source filePNG (default settings)WebP (default settings)WebP (lossless mode)
Photograph A (Kodak test set)503 kB642 kB35.1 kB392 kB
Photograph B (Kodak test set)558 kB866 kB32.4 kB427 kB
Screenshot of a web application37.2 kB39.6 kB18.9 kB13.4 kB
Flat-colour cartoon illustration269 kB360 kB9.8 kB225 kB
All samples together1.37 MB1.91 MB96.3 kB1.06 MB

Across all 4 images together, WebP (lossless mode) came to 55% of the size of PNG (default settings).

WebP (lossless mode) was smaller than PNG (default settings) for 4 of the 4 images.

Across all 4 images together, WebP (default settings) came to 5% of the size of PNG (default settings).

WebP (default settings) was smaller than PNG (default settings) for 4 of the 4 images.

The samples

How this was measured

Engines: libvips 8.14.1 for images and ffmpeg 5.1.9-0+deb12u1 for audio and video, the builds inside NexMedia's conversion worker image. Measured on November 12, 2026.

Image settings were NexMedia's defaults: quality 82, with the lossless option off except where a column says lossless mode. The PNG column is a PNG written by NexMedia's converter (the source PNG went through a lossless TIFF step first), so it reflects NexMedia's PNG encoder rather than the tool that made the original file.

Progressive (interlaced) output is on by default, which typically makes PNG files larger than the same pixels saved without interlacing.

Quality is not measured here. A smaller file is not a better file: encoders trade size against detail differently, and the same quality number means different things in different codecs. Only lossless and uncompressed outputs keep every detail of the data they were given.

Results depend on the content of each file, so other files can give different sizes. Treat these numbers as one reproducible test, not as a rule.

When to choose which

  • Logos and icons on a website

    Lossless WebP keeps edges and transparency exact and is often smaller than the same PNG. Keep the PNG as your editable master.

  • Screenshots

    For documentation, tickets and email, PNG is the format everyone can open. For a web page, lossless WebP gives the same pixels in a smaller file.

  • Photos with transparency

    A lossy WebP can keep a transparent background and shrinks a photograph far more than PNG can. PNG would store every pixel and the file would be large.

  • Files for other people's software

    Some older programs do not open WebP. PNG is the safer choice for files that others will place in documents, presentations or print layouts.

The formats

Convert between them

Converter and compression tools

More comparison guides

Frequently asked questions

Is WebP lossless or lossy?

It can be either. A WebP file made in lossless mode keeps every pixel exactly like a PNG; a file made in lossy mode discards detail to be smaller. NexMedia's default for WebP is lossy, and its options include a lossless setting.

Is WebP smaller than PNG?

Usually, particularly in lossless mode for graphics and in lossy mode for photographs. The measured section above shows the totals for our samples, including a lossless WebP column.

Does WebP support transparency like PNG?

Yes. WebP can store a transparent background in both its lossless and its lossy modes.

Can I convert between PNG and WebP with NexMedia?

Yes, in both directions. PNG to WebP is lossy unless you switch on lossless mode; WebP to PNG keeps the pixels exactly as they are in the WebP file.