PNG to WebP

Published Updated

Re-save a PNG as a lossy WebP at quality 92 with its transparency kept, tested in Chrome and Firefox. A 2 MB PNG photo came out at 179 KB, while small icons can grow.

Lossy colour, exact transparency

This converter always writes WebP at quality 92, without a slider. The colour goes through the VP8 codec, which according to RFC 6386 works only on 8-bit YUV 4:2:0 images: each 2 x 2 block of pixels shares one pair of colour samples. Photos hide that well. Thin coloured lines, small text and pixel art show it as soft or tinted edges.

Transparency is handled separately. RFC 9649, the WebP specification, stores alpha for lossy images in its own ALPH chunk, and the browsers tested kept it exactly. Nothing is painted behind the image first, so see-through areas stay see-through.

Four PNGs through the converter

Each PNG was converted with the same canvas steps the tool uses (draw at full size, encode as WebP at 0.92):

PNGPNG sizeWebP, Google Chrome 156WebP, Firefox 155
Photo, 2000 x 15002,052,270 B179,446 B (91% smaller)179,744 B
Screenshot, 1280 x 8004,593 B4,086 B (11% smaller)3,604 B
Logo on transparency, 600 x 6004,183 B6,600 B (58% larger)6,098 B
Sticker on transparency, 600 x 4002,879 B4,186 B (45% larger)3,722 B

Google's WebP overview says lossy WebP with transparency typically gives files 3 times smaller than PNG. That fits the photo row. For icons and logos of a few kilobytes, the PNG was already the smaller file, and PNG Compressor is the better next step.

Safari cannot write WebP here

MDN's toBlob reference explains that the browser exports PNG when it does not support the requested type, and MDN's compatibility data lists no WebP encoding in Safari on Mac, iPhone or iPad. The tool checks the type it gets back.

In WebKit 26.6, Safari's engine, all four test files came back as PNG; the photo grew to 3,039,731 B, so the page shows a message and saves nothing. Use another browser here.

Converting a PNG to WebP

  1. Step 1

    Add one PNG

    Pick or drop a single PNG. Over 10,000 pixels on either side is turned away.

  2. Step 2

    Convert at quality 92

    There is nothing to set: every file becomes lossy WebP at 92, alpha channel included.

  3. Step 3

    Compare, then save

    The result line puts the PNG size next to the WebP size. Keep the PNG if the WebP is not smaller.

What does not carry over

  • 16-bit colour. PNG allows 16 bits per sample, per Table 12 of the PNG specification. The canvas defaults to 8 bits per channel and WebP stores 8, so deep-colour PNGs are reduced.
  • Text and EXIF chunks. Comments, XMP and eXIf data in the PNG are not copied. Chrome adds only a colour profile chunk of its own.
  • Animation. An animated PNG gives one frame.
  • Very large images. Over 10,000 pixels on either side is refused with a message.

Questions about PNG to WebP

Is the WebP lossless like my PNG?

No. The colour data is encoded lossily at a fixed quality of 92, so pixel values shift slightly. Transparency is the exception: in the tests every alpha value came back exactly.

Why is the WebP bigger than the PNG?

Small flat graphics already compress well as PNG, and lossy WebP spends bytes approximating sharp edges. A 4,183-byte logo on a transparent background became 6,600 bytes in Chrome. The photographic test PNG, by contrast, shrank by 91%.

Does transparency survive the conversion?

Yes. Lossy WebP keeps transparency in a separate alpha chunk beside the colour data. In a test logo, the fully transparent corner stayed at alpha 0 and a half-see-through area stayed at 128 in both Chrome and Firefox.

Why does Safari not convert?

In WebKit the canvas fell back to PNG when asked for WebP, and this page then showed a message in place of a download. Chrome 156 and Firefox 155 wrote real WebP files in our test.

What happens to an animated PNG?

You get one still image. The HTML standard has the browser draw an animation's default image, or else its first frame, onto a canvas.

Can I pick a different quality?

Not on this page; 92 is fixed in the code. Image Compressor takes a PNG, writes WebP at any quality from 10 to 100, and at 100 Chrome and Firefox make that WebP lossless.

Related guide

JPG, PNG, WebP, HEIC and SVG: which image format to use. The guide covers where lossy WebP with transparency beats PNG, and where small logos stay smaller as PNG.

Related Tools