Skip to content
universalImage Converter

Blog

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 | xxd

If 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

  1. Add the WebP files to the converter. Most current browsers can open WebP without trouble.
  2. Choose the output by content: JPEG for photographs, PNG for logos, screenshots, drawings or anything that must keep a transparent background.
  3. For JPEG, a quality near 90 is a good start; go lower only if size matters more than fine detail.
  4. 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.
  5. 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 containsChooseReason
Photograph, no transparencyJPG at 85 to 90Small file, no visible damage at normal zoom
Photo with a cut-out backgroundPNGKeeps the transparent area
Logo, icon, diagramPNGClean edges, no halo around lines
Screenshot with textPNGJPG leaves speckles around letters
Sticker or product shot to place on a colored pagePNGBackground 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

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