Compress JPEG and WebP images

Trade a measured amount of detail for a smaller file, and see the real before and after bytes

The tool loads here. It needs JavaScript, because the work happens on your device.

Your files and your privacy

Your images are never uploaded. Each file is read into this browser tab, re-encoded by the browser’s own image pipeline inside a Web Worker, and handed back as a download. The page’s Content-Security-Policy restricts connect-src to this origin, so the browser itself would block an upload even if the code attempted one.

What this tool does

Reduce the size of a photograph by re-encoding it as a JPEG or a WebP at a quality you choose. The image is decoded and encoded by your own browser, and the panel reports the measured size of the result rather than an estimate.

Compression here means re-encoding. The picture is decoded to plain pixels, drawn once onto a canvas, and handed to the browser’s JPEG or WebP encoder at the quality you set. Those encoders save space by discarding detail, so a smaller file is always paid for in fidelity. The result is measured from the encoded bytes and shown beside the original, as a percentage and as a before-and-after pair, so the trade is something you can judge rather than guess at.

How to use it

  1. Choose one image, or several at once to compress a batch with the same settings.
  2. Set the output format to JPEG for photographs, or to WebP if the picture also needs transparency.
  3. Move the Quality slider. It starts at 82, and it disappears if you select PNG, because PNG’s encoder ignores it.
  4. Select Convert, read the measured Change column for every file, then download one result or all of them as a ZIP.

Example use cases

Supported input and output

Accepts

Produces

What this tool will not do

Common mistakes

Technical notes

Every file is decoded with createImageBitmap, drawn once into an OffscreenCanvas with image smoothing set to high, then encoded by the browser through convertToBlob, falling back to canvas.toBlob where OffscreenCanvas is unavailable. The quality value is clamped to between 0.01 and 1 and passed straight to that encoder, and is omitted entirely for PNG. Batches run in a Web Worker that reports per-file progress and transfers the encoded bytes back rather than copying them.

Frequently asked questions

What quality setting should I use?
For photographs, around 80 is a reasonable start and is where the slider begins. Below roughly 60 you begin to see blocking in flat areas. Convert at two settings and compare the measured sizes, because the right answer depends on the picture.
Why did my file get bigger?
Usually because the output format was PNG, which stores every pixel exactly and cannot compete with JPEG or WebP on photographic content. It also happens when the quality you chose is higher than the quality the original was encoded at.
Does compressing twice cause damage?
Yes. Each lossy encode discards detail, and a second encode works from the already-approximated pixels of the first. Keep your original and compress from that, rather than compressing an export of an export.