You downloaded an image and it came as .webp, but the app you need it in only wants JPG or PNG. It’s a common dead end — plenty of Windows apps open WebP but refuse to export it, and the usual fix is to upload the file to some converter site you’ve never heard of.
You don’t have to. WSL converts WebP to PNG with dwebp and to JPG with ImageMagick, both for free and entirely on your own machine. One file or a whole folder, no uploads.
New to WSL? Set it up with our WSL install guide. If you’re going the other direction, see convert JPG to WebP.
Install the tools
You’ll use two packages: webp (for dwebp) and imagemagick.
sudo apt update && sudo apt install -y webp imagemagick
Quick check:
dwebp -version
magick -version
On older ImageMagick the command is convert instead of magick; both work the same way for these examples.
Convert WebP to PNG (lossless, keeps transparency)
dwebp is purpose-built for decoding WebP. For PNG output it’s the cleanest choice and preserves any transparency:
dwebp input.webp -o output.png
PNG is lossless, so this is the right target when the image has sharp graphics, text, or an alpha channel you want kept exactly.
Convert WebP to JPG (smaller, for photos)
JPG suits photos and can’t hold transparency, so flatten onto a background to avoid black blotches where the image was transparent:
magick input.webp -background white -flatten output.jpg
Set quality if you want to control size:
magick input.webp -background white -flatten -quality 90 output.jpg
Batch convert a folder
To turn every WebP in the current folder into PNG:
for f in *.webp; do dwebp "$f" -o "${f%.webp}.png"; done
To convert them all to JPG instead:
for f in *.webp; do magick "$f" -background white -flatten -quality 90 "${f%.webp}.jpg"; done
Both loops write new files alongside the originals — photo.webp becomes photo.png or photo.jpg — and leave your .webp files untouched.
Pick the right command
| dwebp f.webp -o f.png | WebP to PNG, lossless, keeps transparency |
|---|---|
| magick f.webp -background white -flatten f.jpg | WebP to JPG, fills transparency |
| magick f.webp -quality 90 f.jpg | JPG with explicit quality |
| for f in *.webp; do dwebp ... done | Whole folder to PNG |
| for f in *.webp; do magick ... done | Whole folder to JPG |
Animated WebP: a special case
If your WebP is animated, converting to a single JPG or PNG only captures one frame. To extract every frame as numbered PNGs:
magick animation.webp frame-%03d.png
That writes frame-000.png, frame-001.png, and so on. If you actually want a moving result, converting the animation to a GIF or MP4 is the better route and a different job entirely.
Wrapping up
Converting WebP to JPG or PNG on Windows is a two-tool job: dwebp input.webp -o output.png for lossless PNG with transparency, and magick input.webp -background white -flatten output.jpg for photo-friendly JPG. Wrap either in a for loop to clear a whole folder at once.
It’s free, it handles batches, and because everything runs in WSL, none of your images are uploaded to a third-party site. To compress the results further or resize them for the web, see compress images without losing quality.