# 8 Ways to Convert WebP to PNG or JPG (and Why Sites Serve WebP)

> You saved a .webp file. Convert it with dwebp, ImageMagick, Preview or a browser tool - and see why PNG makes it bigger, not better.

Canonical page: https://www.imageguide.dev/guides/webp-to-png-jpg/

Published: 2026-08-15. Updated: 2026-10-17.

Publisher: ImageGuide, published by Sirv. [Editorial method](https://www.imageguide.dev/about/#how-we-write).

## Quick answer

Convert WebP to PNG when you need lossless raster output or transparency, and to JPG when compatibility with photographic workflows matters more. The conversion does not restore detail already discarded in lossy WebP. Keep the source and check whether an animated input becomes a single still frame.

Reference for this answer: [MDN image format reference](https://developer.mozilla.org/en-US/docs/Web/Media/Guides/Formats/Image_types).

You right-clicked an image, chose **Save image as**, and got a file ending in `.webp`. Then something refused to open it — a print shop, an older version of Photoshop, a school upload form, a colleague's laptop.

The conversion takes seconds on every platform. Before you do it in bulk, though, there is one thing worth knowing: **converting a lossy WebP to PNG makes the file several times larger and adds no quality at all.** This guide covers eight methods and the traps around each.

## Pick Your Method First

| # | Method | Platform | Batch? | Install? |
|---|--------|----------|--------|----------|
| 1 | Hosted converter | Any | No | No |
| 2 | Copy and paste | Any | No | No |
| 3 | macOS Preview and `sips` | macOS | Yes | No |
| 4 | Windows Paint and Photos | Windows | No | No |
| 5 | `dwebp` | Any | Yes | Yes |
| 6 | ImageMagick | Any | Yes | Yes |
| 7 | Python and Pillow | Any | Yes | Yes |
| 8 | Online converters | Any | Yes | No |

## Why You Ended Up With a WebP

Nothing went wrong. The site did what it is supposed to do.

WebP is roughly 25–35% smaller than JPEG at the same visual quality, and it supports transparency and animation, which JPEG does not. Sites serve it through **content negotiation**: your browser sends an `Accept` header advertising WebP support, and the server returns WebP instead of JPEG. The page's HTML may still say `photo.jpg`.

WordPress converts uploads to WebP automatically. Every major image CDN does the same. Google Images serves WebP thumbnails. So the file you saved is simply the file that was sent.

**Browser support is not the problem.** Chrome, Firefox, Safari, Edge and every mobile browser have decoded WebP for years. The friction is elsewhere: older desktop applications, some print workflows, some upload forms with a fixed extension whitelist, and equipment that was configured before 2020.

### Getting the JPEG Instead of Converting

Sometimes the original JPEG is still sitting on the server, and you can just ask for it:

```bash
# Ask without advertising WebP support
curl -H "Accept: image/jpeg,image/*" -o photo.jpg https://example.com/photo.jpg
```

If the site uses content negotiation, this returns the JPEG original, and you have skipped the conversion entirely with no quality loss. If it returns a WebP anyway, the site stores only WebP and you need one of the methods below.

## The Trap: PNG Is Not an Upgrade

This is the mistake that costs people the most, and it is invisible until you look at the file sizes.

A WebP is usually **lossy** — the same kind of compression as JPEG. The detail it discarded is gone. Converting it to PNG does not recover anything; it just stores the already-degraded pixels in a lossless container.

Here is an actual measurement, taking a lossy WebP from this site and converting it four ways:

[View the interactive chart on the canonical page](https://www.imageguide.dev/guides/webp-to-png-jpg/).

The PNG is **eight times larger** than the WebP and looks identical to it. You have gained nothing and lost most of a megabyte. Even the JPG is larger, because it re-encodes data that WebP had already compressed more efficiently.

**Convert to PNG only when** the image has transparency, or is a logo, screenshot, diagram or line art. **Convert to JPG** for photographs, at quality 90 or above so the second lossy pass stays invisible.

Check which kind you have before deciding:

```bash
# "Lossy" or "Lossless" appears in the output
webpinfo photo.webp | grep -i format

# ImageMagick reports it too
magick identify -verbose photo.webp | grep -i "compression\|alpha"
```

If the WebP is **lossless** — common for screenshots and graphics exported from design tools — then PNG is the correct target, and the conversion genuinely loses nothing.

## Transparency Disappears in JPG

WebP supports an alpha channel. JPEG does not. Convert a transparent WebP logo to JPG and the transparent areas become **black** in most tools, which surprises people who expected white.

Say what you want explicitly:

```bash
# Flatten onto white
magick logo.webp -background white -alpha remove -alpha off logo.jpg

# Keep the transparency by choosing PNG instead
magick logo.webp logo.png
```

If the image has transparency, PNG is nearly always the right answer.

## 1. The Hosted Converter

Nothing to install, and it works on a locked-down machine. The selected file is uploaded to Sirv, so use it only for non-sensitive images.

- [WebP to PNG](/convert/webp-to-png/) — for logos, screenshots and anything transparent
- [WebP to JPG](/convert/webp-to-jpg/) — for photographs
- [WebP to AVIF](/convert/webp-to-avif/) — if the destination is another web page

The converter handles one file at a time. For a local batch, use `dwebp`, ImageMagick, Pillow, or [Press](/press/).

## 2. Copy and Paste

The method nobody documents, and it needs no software at all.

1. In your browser, right-click the image and choose **Copy image** (not *Copy image address*)
2. Open any editor — Paint on Windows, Preview on macOS via **File → New from Clipboard**, or GIMP
3. Paste, then save as PNG or JPG

The browser has already decoded the WebP into raw pixels, so what lands on the clipboard is a plain bitmap. Every editor accepts it, including ones that have never heard of WebP.

Useful for exactly one image on a computer where you cannot install anything. Useless for forty.

## 3. macOS Preview and sips

macOS has decoded WebP since Big Sur, so everything built in already works.

**Preview**, one file:

1. Open the `.webp` in Preview
2. **File** → **Export**
3. Pick **PNG** or **JPEG**, set the quality slider, save

**Finder**, for a batch: select the files, right-click → **Quick Actions** → **Convert Image**, choose the format and tick **Preserve Metadata**.

**`sips`**, for scripts:

```bash
# One file
sips -s format png photo.webp --out photo.png

# JPEG with a quality setting
sips -s format jpeg -s formatOptions 92 photo.webp --out photo.jpg

# A folder
mkdir -p out
for f in *.webp; do
  sips -s format png "$f" --out "out/${f%.webp}.png"
done
```

## 4. Windows Paint and Photos

Windows 10 and 11 open WebP natively in Photos and Paint.

**Paint**: open the `.webp`, then **File** → **Save as** → **PNG picture** or **JPEG picture**.

**Photos**: open, then **⋯** → **Save as**, choosing the format from the dropdown.

Neither handles batches, and Paint strips metadata. For more than a few files use method 1 or method 6.

**PowerToys Image Resizer**, if you already have PowerToys installed, converts formats as a side effect of resizing and does work on a multi-file selection. Right-click the files → **Resize with Image Resizer**, then pick the output format in the settings.

## 5. dwebp

The reference decoder from Google's libwebp, and the most faithful conversion available.

```bash
# Install
sudo apt install webp        # Debian/Ubuntu
brew install webp            # macOS
winget install Google.libwebp

# To PNG, which is the default output
dwebp photo.webp -o photo.png

# To a plain uncompressed formats if you need them
dwebp photo.webp -pgm -o photo.pgm
dwebp photo.webp -tiff -o photo.tiff

# A whole folder
for f in *.webp; do dwebp "$f" -o "${f%.webp}.png"; done

# In parallel, for large batches
ls *.webp | xargs -P 8 -I {} sh -c 'dwebp "{}" -o "${1%.webp}.png"' _ {}
```

`dwebp` only writes lossless formats — PNG, PAM, PPM, TIFF. There is no JPEG output, by design: it will not silently add a second lossy pass. To reach JPEG, decode then encode:

```bash
dwebp photo.webp -o - | magick - -quality 92 photo.jpg
```

The package also gives you `webpinfo`, which reports whether a file is lossy or lossless, whether it has alpha, and whether it is animated. Run it before deciding your target format.

## 6. ImageMagick

The convenient batch option, and the one to use when you also want to resize or flatten.

```bash
# One file
magick photo.webp photo.png

# A folder, writing alongside the originals
magick mogrify -format png *.webp

# To JPEG at a sensible quality
magick mogrify -format jpg -quality 92 *.webp

# Flatten transparency onto white for JPEG
magick mogrify -format jpg -quality 92 -background white -alpha remove -alpha off *.webp

# Convert and resize in one pass
magick mogrify -format jpg -quality 90 -resize 1600x1600\> *.webp
```

Check the delegate is present first, since some minimal builds omit it:

```bash
magick -list format | grep -i webp
```

You want to see `WEBP  rw+`. If it shows nothing, install `libwebp-dev` and use your distribution's ImageMagick package, or fall back to `dwebp`.

## 7. Python and Pillow

For conversion inside a larger program or pipeline.

```python
# pip install pillow
from PIL import Image

image = Image.open("photo.webp")

# To PNG, keeping any transparency
image.save("photo.png")

# To JPEG, flattening transparency onto white
if image.mode in ("RGBA", "LA", "P"):
    background = Image.new("RGB", image.size, (255, 255, 255))
    rgba = image.convert("RGBA")
    background.paste(rgba, mask=rgba.split()[-1])
    image = background

image.save("photo.jpg", "JPEG", quality=92, optimize=True)
```

That transparency step is not optional. Calling `.save("out.jpg")` on an RGBA image raises `OSError: cannot write mode RGBA as JPEG` in older Pillow versions, and produces a black background in some paths. Flatten deliberately.

For a folder, see our [batch processing guide](/guides/batch-image-processing-workflows/), which covers parallelism and error handling.

## 8. Online Converters

They work. The usual caution applies: the file is uploaded to a server you do not control, and stays there for however long the privacy policy allows.

For an image you downloaded from a public website, that is a non-issue — it is already public. For a WebP exported from your own design tool, a client's artwork, or anything unreleased, use one of the seven local methods above instead.

## Animated WebP

If the file animates, most of the above still applies but the target changes.

```bash
# Check first — "Animation: yes" in the output
webpinfo animation.webp | grep -i animation

# Extract to a GIF via ffmpeg
ffmpeg -i animation.webp -vf "fps=20,scale=480:-1:flags=lanczos,split[s0][s1];[s0]palettegen[p];[s1][p]paletteuse" -loop 0 out.gif

# Or, better, to an MP4
ffmpeg -i animation.webp -movflags faststart -pix_fmt yuv420p -vf "scale=trunc(iw/2)*2:trunc(ih/2)*2" out.mp4

# Pull out the individual frames
anim_dump -folder frames animation.webp
```

Converting an animated WebP to GIF makes the file **several times larger** and cuts the colour depth to 256. Only do it if the destination demands a GIF. Our guide on [turning video into GIF](/guides/video-to-gif/) covers the palette work that keeps the result watchable.

## Do Not Convert If It Is Going Back on the Web

The most common self-inflicted wound: someone downloads a WebP, converts it to PNG "so it works", and uploads the PNG to their own site. The page now carries a file eight times heavier for no visible benefit, and Lighthouse flags it.

If the destination is a web page, keep the WebP, or convert to AVIF. Our [WebP vs AVIF vs JPEG XL](/guides/webp-avif-jpeg-xl-comparison/) comparison covers choosing between them, and [converting images to WebP in bulk](/guides/convert-to-webp/) covers the opposite direction.

## Summary

### The Eight Methods

| # | Method | Use it when |
|---|--------|-------------|
| 1 | Hosted converter | Any platform, one non-sensitive file |
| 2 | Copy and paste | Exactly one image on a locked-down machine |
| 3 | macOS Preview and `sips` | You are on a Mac |
| 4 | Windows Paint and Photos | One or two files on Windows |
| 5 | `dwebp` | **Highest fidelity**, and it refuses to add lossy passes |
| 6 | ImageMagick | Batches, especially with a resize |
| 7 | Python and Pillow | Inside a program |
| 8 | Online converters | Images that are already public |

### Checklist

1. ✅ You tried requesting the original with a different `Accept` header
2. ✅ `webpinfo` told you whether the source is lossy or lossless
3. ✅ Lossy sources went to JPG, not PNG
4. ✅ Transparent images went to PNG, or were flattened deliberately
5. ✅ JPEG quality was set to 90 or above
6. ✅ Animated files went to MP4 rather than GIF where possible
7. ✅ Nothing destined for a web page was converted at all

For one file, paste it into any editor. For a folder, `magick mogrify -format png *.webp`. For fidelity above all, `dwebp`.

## Sources

- [WebP documentation, Google](https://developers.google.com/speed/webp/docs/compression)
- [Image types, MDN](https://developer.mozilla.org/en-US/docs/Web/Media/Guides/Formats/Image_types)
