Skip to content

Bulk Convert PNG to WebP on Windows Free (No Upload)

Bulk convert PNG to WebP on Windows free with WSL and cwebp. Batch a whole folder, use lossless for graphics, and keep every file on your own machine — no uploads.

MGMCSA Guru Team June 9, 2026 4 min read
A WSL terminal batch-converting a folder of PNG files to WebP with cwebp on Windows

PNG is great for graphics and terrible for page weight. A folder of UI screenshots or exported logos can be tens of megabytes, and converting them to WebP usually cuts that hard while keeping the edges sharp. The problem is doing it in bulk: online converters cap how many files you can drop in, and every one of those files leaves your machine.

WSL solves both. Google’s cwebp converts PNG to WebP locally, for free, and a one-line loop handles an entire folder at once. Nothing gets uploaded, there’s no file count limit, and transparency is preserved.

If WSL isn’t set up yet, start with our WSL install guide. The same toolchain also does the reverse and the JPG case — see convert JPG to WebP if your sources are photos.

Install the WebP tools

The encoder lives in the webp package. In your WSL terminal:

sudo apt update && sudo apt install -y webp

That gives you cwebp (encode to WebP), dwebp (decode from WebP), and img2webp (build animated WebP). Check it’s installed:

cwebp -version

Lossless or lossy? Decide first

This is the one choice that matters for PNGs, because most PNGs aren’t photos.

  • Graphics, logos, icons, screenshots, flat color, sharp text → use lossless. Lossy compression blurs hard edges and introduces fuzz around text.
  • PNG that’s really a photograph → use lossy -q, which produces a much smaller file with no visible difference.

Lossless single file:

cwebp -lossless input.png -o output.webp

Lossy (photo-like PNG):

cwebp -q 80 input.png -o output.webp

Bulk convert a folder

To convert every PNG in the current folder to lossless WebP, writing each result next to the original:

for f in *.png; do cwebp -lossless "$f" -o "${f%.png}.webp"; done

"${f%.png}.webp" swaps the extension, so logo.png becomes logo.webp. Your PNGs are left in place — you get both files.

For photo-like PNGs, swap in lossy quality:

for f in *.png; do cwebp -q 80 "$f" -o "${f%.png}.webp"; done

Include subfolders (recursive)

If your PNGs are spread across nested folders, find walks the whole tree and runs cwebp on each match:

find . -type f -iname "*.png" -exec sh -c 'cwebp -lossless "$1" -o "${1%.png}.webp"' _ {} \;
  • -iname "*.png" matches .png and .PNG.
  • -type f skips directories.
  • The sh -c '... "$1" ...' wrapper lets each file’s name be reused safely for the output.

Every WebP is written beside its source PNG, mirroring the folder structure exactly.

Which command for which job

cwebp -lossless f.png -o f.webp Single graphic/screenshot, crisp output
cwebp -q 80 f.png -o f.webp Single photo-like PNG, smaller file
for f in *.png; do ... done Every PNG in one folder
find . -iname '*.png' -exec ... Every PNG including subfolders
img2webp -d 100 *.png -o anim.webp Animated WebP from PNG frames

Animated WebP from PNG frames

Different job, same package: if you have a numbered sequence of PNG frames and want one animated WebP, use img2webp:

img2webp -loop 0 -d 100 frame-*.png -o animation.webp

-d 100 sets 100 ms per frame and -loop 0 loops forever. This isn’t bulk conversion — it merges frames into a single animated file — but it’s the right tool when that’s what you actually need.

Wrapping up

Bulk converting PNG to WebP on Windows comes down to one decision and one loop. Use -lossless for graphics and screenshots, -q 80 for photo-like PNGs, and a for loop (or find for subfolders) to process the whole batch in one line. It’s free, it preserves transparency, and because cwebp runs in WSL, none of your files are uploaded anywhere.

Set it up once and folder-sized PNG conversions become a single repeatable command.

Frequently asked questions

Should I use lossless mode when converting PNG to WebP?

Often, yes. PNGs are usually logos, icons, screenshots, or graphics with sharp edges and flat color, and lossless WebP keeps those crisp while still shrinking the file. If a PNG is actually a photo, lossy mode with -q gives smaller files at no visible cost.

How do I convert every PNG in a folder at once?

Use a bash for-loop that runs cwebp on each .png and writes a matching .webp beside it. To include PNGs in subfolders too, use find with the same command. Both approaches are shown in this guide and leave your originals in place.

Do the PNG files get uploaded to a server?

No. cwebp runs locally in WSL, so the conversion happens entirely on your PC. That's the main advantage over online PNG-to-WebP tools, especially for screenshots of internal systems or anything you can't share publicly.

Will WebP keep PNG transparency?

Yes. WebP supports an alpha channel, so transparent areas in a PNG are preserved in both lossless and lossy WebP. Transparency is only lost if you convert to a format that doesn't support it, like JPG.

Can I make an animated WebP from multiple PNG frames?

Yes, with img2webp from the same WebP package. It assembles a sequence of PNG frames into a single animated WebP. That's a different job from bulk-converting many separate PNGs, which is what the loops here do.

Sources & further reading

Official vendor documentation referenced while writing this guide.

MG

MCSA Guru Team

IT & Systems Administration

We are working IT pros and system administrators who spend our days in Windows Server, Microsoft 365, and the wider Microsoft stack. MCSA Guru is where we write down the fixes and walkthroughs we wish we had found the first time.

MCSA Guru provides independent, educational IT guidance. Microsoft, Windows, Windows Server, Microsoft 365, Exchange, and Microsoft Teams are trademarks of Microsoft Corporation; Docker is a trademark of Docker, Inc. MCSA Guru is not affiliated with or endorsed by Microsoft or Docker. Always test changes in a safe environment before applying them in production.

Related guides

Fixing something right now?

Jump straight into the guide library or search for the exact error or task you are dealing with.