Image Compressor

Compress JPG, PNG and WebP images in your browser with a quality slider or a target file size, reduce PNG colours, and compare before and after. Nothing is uploaded.

How the Image Compressor works

Make JPG, PNG and WebP images smaller without changing their dimensions. Choose a quality or a target file size, reduce PNG colours, and compare the result with the original before downloading. Everything happens in your browser.

  1. Drop images onto the page, click to choose them, or paste them.
  2. Under Save as, keep the format or switch to JPG, WebP or PNG.
  3. For JPG and WebP, set Quality, or switch to Target size and enter a maximum in KB.
  4. For PNG, pick Reduce colours (choose Colours and Dithering) or Lossless.
  5. Drag Compare on the preview to check the quality, then download each image or click Download all (ZIP).

How JPG and WebP compression works

Each image is decoded, then saved again by the browser's encoder at the quality you choose. Lower quality throws away fine detail the eye is least likely to notice, which is where the savings come from. In Target size mode the tool tries 95% quality first; if that's too big it tries 30%, then searches between them (seven halving steps) for the highest quality that fits. If even 30% is too big, it keeps the 30% version and says the target wasn't met. Use the Image Resizer to reduce the dimensions as well.

What happens to PNGs

PNG is lossless, and re-saving a PNG losslessly rarely makes it much smaller, so the default is Reduce colours: the image is reduced to a palette of up to 256 colours (median cut, refined with a few k-means passes) and saved as an indexed PNG, which is often a fraction of the original size. Dithering mixes nearby colours to keep gradients smooth. If the image already has no more colours than you chose, every pixel is kept exactly. Transparency is preserved. Lossless re-saves the pixels and drops metadata, and saving as WebP is often the biggest saving of all.

Files don't get bigger in the same format

If re-saving an image in its own format would make it larger, for example a JPG that was already well optimised, the tool keeps the original image data with its metadata removed and labels it "already well compressed". Switching format (say PNG to JPG) can still produce a bigger file, and the size change is shown in amber when that happens.

Privacy

Files are read, decoded and encoded by your own browser with the Canvas API. Nothing is uploaded, and the download is created on your device, so it's safe for personal photos and work documents. Compressed files don't keep EXIF data such as the camera model, date taken or GPS location. When the original is kept because it was already smaller, its metadata is removed too; only a colour profile and an orientation tag can remain.

Frequently asked questions

How do I compress an image to under 100 KB?

Choose JPG or WebP under Save as, switch to Target size and enter 100. The tool finds the highest quality that fits. If a large photo still can't get under 100 KB at 30% quality, make it smaller first with the Image Resizer.

Can I compress a PNG without losing quality?

Choose Lossless under PNG. It re-saves the image and drops metadata, but PNG data is usually already compressed well, so the saving is often small. For real reductions use Reduce colours (most screenshots and graphics look identical at 256 colours) or save as WebP.

Is JPG or WebP better for compression?

WebP usually produces smaller files than JPG at the same visual quality and supports transparency, and all current browsers display it. Use JPG when a site, app or form only accepts JPG.

Does compressing change the image dimensions?

No. The compressor keeps the width and height and only changes how the pixels are stored. The one exception is an image larger than this browser can handle in a canvas, which is scaled down and labelled.

Are my images uploaded?

No. Compression runs in your browser; PNG colour reduction runs in a background worker on your device. Nothing is sent to a server.

How is this different from the Image Resizer?

The Image Resizer changes dimensions as well as quality. The compressor keeps the size, adds PNG colour reduction and a side-by-side comparison slider, and never returns a bigger file in the same format.

Similar Utility tools

3 related