WebP Converter
Convert to WebP in the browser, and see WebP, JPEG and PNG measured side by side so you can tell which one actually wins.
This tool needs JavaScript: the encoding happens in your browser, which is also why nothing is uploaded.
Best saves whichever of the three came out smallest for this particular image, which is not always WebP.
Applies to WebP and JPEG. PNG is lossless, so it ignores this and is in the table for comparison.
Zero keeps the size as it is. Anything else scales down first, which usually saves more than the format choice does.
Only used by JPEG, which has no transparency. WebP and PNG keep it.
Choose an image and all three formats are written, so the sizes are measured rather than guessed.
“Use WebP” is right most of the time, and the interesting question is by how much for your file. A photograph might be 40 percent under the JPEG or 5 percent. A screenshot of text might be better as a PNG, and a PNG that came out of a real optimiser usually is. The difference between guessing and knowing is one second of encoding.
So this encodes all three and shows you the sizes. Nothing is uploaded: the file is read, drawn and encoded in the page.
How to use
- Drop an image on the panel, or click to choose one.
- Read the table. Three rows, three real file sizes, the smallest marked, each compared against the file you started with.
- Adjust quality if you want, and watch all three numbers move.
- Leave Save as on best to download whichever won, or name a format.
Example
A 1200 by 900 photograph at quality 82, measured in Chrome:
WebP 41.5 KB −64% ← smallest
JPEG 65.2 KB −43%
PNG 1.38 MB +1144%
The same settings on a flat two-colour logo:
WebP 8.2 KB −78% ← smallest
JPEG 20.1 KB −46%
PNG 37.1 KB −0%
Three things in there are worth reading twice.
WebP wins both, which is the usual answer, and it wins the logo by more than the photograph, because lossy compression has an easy time with large flat areas.
JPEG loses the logo badly for its size, and if you zoom in you will see why: it puts ringing around every hard edge, so the file grows while the image gets worse.
And PNG’s numbers are enormous, which is about the encoder rather than the format. A browser’s PNG encoder does the minimum; a real optimiser would get that photograph well under half. So read the PNG row as “what this browser can do”, not as “what PNG can do”.
Pitfalls
Resizing beats re-encoding. A 4000 pixel photo saved as WebP is still a 4000 pixel photo. Setting Maximum width to what the page actually displays usually saves more than any format choice, and the two compound.
JPEG has no transparency. A PNG with transparent corners saved as JPEG gets the background colour behind it. The table still shows JPEG’s size, which is why it can look deceptively good for a logo.
Quality numbers are not comparable across formats. WebP at 82 and JPEG at 82 are not the same amount of loss; the encoders use the scale differently. Compare the sizes and look at the preview.
PNG ignores quality entirely. It is lossless, so its row does not move when you change the slider. That is the point of having it in the table.
The PNG row is the browser’s PNG, not the best PNG. Browsers optimise for speed, so a canvas writes a bigger PNG than a dedicated tool would. If PNG is within shouting distance of the winner and you need lossless, run your original through a real PNG optimiser before deciding.
Animated images lose their animation. A canvas draws one frame, so an animated GIF or WebP comes out as a still. Use a video format, or keep the original.
Metadata is dropped. Re-encoding loses EXIF, including the camera, the location and the copyright field. For the web that is usually a saving; if you need it, keep the original file alongside.
Compatibility
Writing WebP needs Chrome 50, Firefox 96 or Safari 14 and later. Where it is not supported the WebP row says so rather than showing a wrong number, and best will not choose it.
Reading is broader than writing: AVIF and GIF read in current browsers and come out as one of the three writable formats.
Serving WebP to browsers that support it and JPEG to the rest is a server
concern, not a file concern: WordPress 6.8 and later can do it for uploads, and
so can a <picture> element with two <source> tags.
Frequently asked questions
Should I just always use WebP?
What about AVIF?
Why is the PNG row so large?
Does quality 100 mean lossless?
Can I convert a whole folder?
cwebp -q 82 in a loop does the same
job, and WordPress can convert on upload from 6.8.