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.

Save as

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.

  • WebP —
  • JPEG —
  • PNG —

Choose an image and all three formats are written, so the sizes are measured rather than guessed.

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

  1. Drop an image on the panel, or click to choose one.
  2. Read the table. Three rows, three real file sizes, the smallest marked, each compared against the file you started with.
  3. Adjust quality if you want, and watch all three numbers move.
  4. 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?
For anything on the web where a little loss is acceptable, close enough to always: in this table it usually wins by a wide margin. The exception is something that has to stay lossless, such as a screenshot people will zoom into or an image with hard edges you are going to re-edit. There the comparison to make is against a properly optimised PNG, which this table cannot produce.
What about AVIF?
It is usually smaller than WebP again, often by 20 percent, and no browser can write it from a canvas. That is why it is not in the table. To produce AVIF you need a build step or a server that converts on upload.
Why is the PNG row so large?
Because the browser’s PNG encoder is simple: it is built for speed, not for the smallest file. A PNG that came out of a dedicated optimiser is better compressed than a canvas can manage, so re-encoding one adds bytes. When the notice says nothing beat the file you started with, that is usually what happened.
Does quality 100 mean lossless?
Not for WebP or JPEG. Both still transform the image; 100 just spends far more bytes. Lossless WebP exists in the format but is not what a canvas writes.
Can I convert a whole folder?
Not here, one file at a time. For a folder, cwebp -q 82 in a loop does the same job, and WordPress can convert on upload from 6.8.
Weekly drops

New tools, when there are new tools

One email when something worth using ships. No schedule to fill, so no filler.

Your address goes nowhere else, and one click unsubscribes.