How to Convert WebP to JPG or PNG
If a picture you saved from a website refuses to open in an older program, it is probably WebP. Convert it to JPG for photographs or PNG for graphics and transparency; the rest of this article shows how to be sure, and what happens to the file size.
By the Universal Image Converter Team
Why you ended up with a WebP file
You right-click an image, save it, and the file is called something.webp, or worse, something.jpg that will not open. Websites often send the image in the format that the visiting browser said it can handle, and almost every current browser says it can handle WebP. A site that stores one image can therefore deliver WebP to you, even if its address ends in .jpg. When you save it, you save what was delivered.
The file extension is a label, not a guarantee. To check a suspect file, look at its first bytes. A WebP file begins with the letters RIFF, then four bytes of length, then WEBP. A PNG starts with the byte 0x89 followed by PNG, a JPEG starts with the bytes FF D8 FF, a GIF with GIF87a or GIF89a, and a BMP with BM. In a terminal on Mac or Linux you can see this with a command:
head -c 12 picture.jpg | xxdIf the output shows 5249 4646 and 5745 4250 (RIFF and WEBP in hexadecimal), it is WebP in disguise. You do not need to rename it; the converter reads the actual content, not the label.
Converting in five steps
- Add the WebP files to the converter. Most current browsers can open WebP without trouble.
- Choose the output by content: JPEG for photographs, PNG for logos, screenshots, drawings or anything that must keep a transparent background.
- For JPEG, a quality near 90 is a good start; go lower only if size matters more than fine detail.
- If the image had transparent areas and you chose JPEG, select the background color they should take. The transparency article explains how to pick it.
- Download the converted files.
WebP files with an animation convert as a single still image, covered in the GIF article, which applies to animated WebP as well.
Expect the output to be larger than the WebP
WebP achieves small files with lossy compression tuned for the web, and unpacking it into JPG or PNG usually increases the byte count, even though the picture is identical in pixels. I measured with a synthetic 1920 x 1080 smooth image (soft gradient with blurred circles, no noise). Saved as lossy WebP at quality 80 it was 9,556 bytes. Decoded and re-saved as JPG at quality 90 it was 79,791 bytes, and as PNG 150,868 bytes. That is 8 times and 16 times larger. A smooth synthetic picture is the best case for WebP and exaggerates the effect, but the direction holds for real photos as well: the conversion cannot bring back the efficiency of the original codec.
Plan for that growth when a size limit applies. If an upload form takes only JPG and allows 2 MB, a web image of a few hundred kilobytes will often still fit after conversion, though the growth factor depends on the picture, so check the size shown for the result. A large WebP original, such as a 4000 pixel photo, may not, and then the maximum size menu is the lever to use, not the quality slider.
JPG or PNG: a rule that depends on the picture
| What the WebP contains | Choose | Reason |
|---|---|---|
| Photograph, no transparency | JPG at 85 to 90 | Small file, no visible damage at normal zoom |
| Photo with a cut-out background | PNG | Keeps the transparent area |
| Logo, icon, diagram | PNG | Clean edges, no halo around lines |
| Screenshot with text | PNG | JPG leaves speckles around letters |
| Sticker or product shot to place on a colored page | PNG | Background of any color works later |
One point is easy to miss. A lossy WebP has already thrown away detail. Converting to PNG will not restore it, so a PNG made from a low-quality WebP is a large file of a small-file picture. If the picture looks blocky in the WebP, it will look blocky in the PNG. See lossy vs lossless formats for why.
Three common cases
A product photo saved from a shop page. It is typically a lossy WebP of a photograph. Convert to JPG at 90. The result is larger than the WebP, but any marketplace or office program will take it.
A sticker from a messaging app. Stickers are often 512 x 512 pixel WebP files with a transparent surround. At 4 bytes per pixel (red, green, blue, alpha), the raw data is 512 x 512 x 4 = 1,048,576 bytes, a megabyte, and the compressed file is a small fraction of that. Convert to PNG to keep the transparency; JPG would paint the transparent area with a solid color.
A screenshot saved by a chat or note app as WebP. It was probably compressed lossily, so letters carry soft halos. Convert to PNG if you want to keep exactly what is there, but do not expect a clean result; if you can retake the screenshot, do that.
Problems you may run into
- The result has a black or white box where transparency was. JPG has no transparency. Choose PNG, or pick a background color for JPG that matches where the image will be shown.
- Colors look slightly different from the web page. The result is in the browser's standard sRGB space and has no embedded color profile. That is expected; the color profiles article covers when it matters.
- A very large picture comes out smaller than the original. The WebP format itself allows up to 16383 pixels per side, but pictures above about 16.8 megapixels are scaled down by the converter, for a reason covered in how browser-based conversion works.
- A file named .webp will not open at all. It may be damaged, cut short by an interrupted download, or not an image at all. Compare its first bytes as shown above, and try fetching it again.
- The converted picture is rotated or mirrored. This is rare. The converter applies the orientation stored in the file first, so if the result differs from what another program shows, the other program is the one ignoring the orientation.
Avoiding WebP in the first place
When you only need the picture, try to find a download button, a share option, or an "open image in new tab" command; sites differ in what they provide, and the result is sometimes the original JPG or PNG instead of the delivered WebP. When you control the source, for example your own site, you can store originals in JPG or PNG and let the server decide what to send. For the reverse direction, making WebP files yourself for your own pages, see how to convert images to WebP.
Add your WebP files, choose JPG or PNG by what the picture contains, and download the converted copies.
Open the image converter