WEBP to PNG
Published Updated
Save a WebP image as a lossless PNG with its transparency kept. Animated files give their first frame.
Three test files
WebP files made with Pillow, converted with this tool in Google Chrome 156:
| WebP file | WebP size | PNG size | Note |
|---|---|---|---|
| Photo, 2000 x 1500, lossy | 59,108 bytes | 1,880,576 bytes | 32 times larger |
| Sticker, 600 x 400, lossless, transparent | 766 bytes | 8,513 bytes | Transparency kept |
| Animation, 3 frames | 188 bytes | 1,028 bytes | First frame only |
Lossless output from a format that may not be
WebP comes in two kinds, lossy and lossless, as MDN's image format guide describes. This tool decodes either with your browser, draws the pixels on a canvas the same size and writes them as PNG. Nothing is resized and no colours are reduced.
If the WebP was lossy, the PNG faithfully keeps its compression artefacts. That is why a PNG made from a small lossy WebP is large without looking any better.
The same WebP files in three browsers
A WebP file is a RIFF container, with image data in VP8 or VP8L chunks and animation in ANIM and ANMF chunks. Your browser decodes it, the tool draws it on a canvas and the browser's own encoder writes the PNG, so the bytes differ from browser to browser. Measured with this tool on generated WebP files in Google Chrome 157, Firefox 155 and Playwright's WebKit build (not the Safari app), each cell is the PNG size in bytes:
| WebP file | WebP size | Chrome 157 | Firefox 155 | The WebKit build |
|---|---|---|---|---|
| Photo, 2000 x 1500, lossy | 71,596 | 2,767,967 | 2,490,974 | 2,660,022 |
| Photo, 800 x 600, lossless | 285,906 | 623,356 | 553,909 | 550,306 |
| Logo, 800 x 500, lossless, partly transparent | 9,854 | 42,125 | 27,906 | 38,028 |
| Animation, 300 x 200, 3 frames | 194 | 2,077 | 739 | 1,647 |
| Photo, 333 x 77, lossy | 1,532 | 31,692 | 27,502 | 27,948 |
| One pixel | 38 | 88 | 98 | 163 |
Every PNG was truecolour with alpha (colour type 6) at 8 bits per channel, photos without transparency included. Chrome 157 wrote the chunks IHDR, IDAT and IEND. Firefox 155 added a chunk named deBG, and the WebKit build added sRGB and eXIf.
How close the PNG is to the WebP's pixels
Each PNG was read back in the same browser and compared with a reference decode made with Pillow 11.3 (libwebp 1.5.0). In each comparison, fully transparent pixels stayed fully transparent and the alpha value of every other pixel matched.
| WebP file | Chrome 157 | Firefox 155 | The WebKit build |
|---|---|---|---|
| Lossless photo, lossless transparent logo (70,812 partly transparent pixels), animation, one pixel, file with an embedded sRGB profile | 0 pixels differ | 0 pixels differ | 0 pixels differ |
| Lossy photo, 2000 x 1500 | 1,526,307 of 3,000,000 pixels differ, by at most 2 | 0 pixels differ | 0 pixels differ |
| Lossy photo, 333 x 77 | 12,269 of 25,641 pixels differ, by at most 2 | 0 pixels differ | 0 pixels differ |
| Lossy logo with 70,812 partly transparent pixels | 7,017 of them differ in colour, by up to 108 | 8,669 differ, by up to 254 | 6,488 differ, by up to 104 |
| Lossless WebP, 600 x 400 as stored, EXIF orientation 6 | PNG 600 x 400 | PNG 600 x 400 | PNG 400 x 600 |
| First half of the lossy photo, 35,798 of 71,596 bytes | Message: Couldn't read this image | Message: Couldn't read this image | Message: Couldn't read this image |
| Text file named .webp | Message: Couldn't read this image | Message: Couldn't read this image | Message: Couldn't read this image |
Converting WebP to PNG
Step 1
Add a WebP image
The preview shows its pixel size and file size.
Step 2
Convert to PNG
The image is drawn on a canvas at full size and saved as PNG. There are no settings.
Step 3
Download
The PNG has the same name with .png at the end, and the result line compares the two sizes.
Animated WebP and other routes
Animation is lost because a canvas can only hold one image; the HTML standard has browsers draw the first frame. For a smaller file with a white background use WebP to JPG. To shrink the PNG afterwards, PNG Compressor can scale it down.
WebP to PNG: answers
Why is the PNG so much bigger than the WebP?
A lossy WebP stores an approximation of the image; PNG stores every pixel exactly. In a test, a 59 KB WebP photo of 2000 x 1500 pixels became a 1.88 MB PNG, 32 times larger. The PNG holds no more detail than the WebP had.
Does converting to PNG improve quality?
No. Any detail removed when the WebP was made stays lost. PNG only stops further loss, which is useful when you are going to edit the image and save it several times.
Is transparency kept?
Yes. A transparent WebP gives a PNG with the same transparent areas. In a test with a sticker on a transparent background, the corner pixel was fully transparent in the PNG.
What happens to an animated WebP?
You get one still frame. The HTML standard tells browsers to use the first frame when an animated image is drawn on a canvas, and the test animation came out as its first, red frame.
Why convert WebP at all?
Current browsers all display WebP; MDN lists Chrome, Edge, Firefox, Opera and Safari 14 or later on macOS 11 or later. Older software and some upload forms still accept only PNG or JPEG, which is the usual reason to convert.
Why is the PNG a different size in each browser?
Each browser has its own PNG encoder. The same 800 x 500 lossless logo gave 42,125 bytes in Chrome 157, 27,906 in Firefox 155 and 38,028 in the WebKit build. All three wrote colour type 6, truecolour with alpha at 8 bits per channel, so a photo without transparency still carries an alpha channel.
How close is the PNG to the pixels the WebP decodes to?
For lossless WebP files it matched a reference decode in every pixel in all three browsers. For lossy photos Firefox 155 and the WebKit build matched it too, while Chrome 157 differed by at most 2 in about half of the pixels of the 2000 x 1500 test photo. For a lossy file with partly transparent areas, some of those pixels differed in colour in every browser, and the alpha values matched.
Does the PNG keep the rotation set in my WebP?
It depends on the browser. A WebP stored as 600 x 400 with an EXIF orientation of 6 gave a 600 x 400 PNG in Chrome 157 and Firefox 155 and a 400 x 600 PNG in the WebKit build. The PNG carries no rotation of its own.
What happens with a damaged or cut-off WebP?
The tool shows Couldn't read this image and makes no PNG. That was the result in Chrome 157, Firefox 155 and the WebKit build for a text file named .webp and for the first half of a lossy WebP, whose header declares more bytes than the file holds.