Image compressor

Squeeze an image to a target size with a live quality preview.

How it works

Compression happens on a canvas in your browser using the built-in JPEG and WebP encoders. The file is never uploaded.

Resolution beats quality

File size scales with the number of pixels, so halving the width and height quarters the pixel count — a far larger saving than any quality setting, and usually with less visible damage. If an image is displayed at 800 px wide, storing it at 4000 px is pure waste.

Where the quality slider actually matters

Between 100% and about 85% the difference is invisible in most photographs while the file shrinks dramatically. Below roughly 60% you start seeing blocking around edges and banding in smooth gradients. 80% is a reliable default.

Hitting a target size

There is no formula from quality to bytes — it depends entirely on the image content. This tool binary-searches the quality setting, encoding twelve times to converge just under your target. Flat graphics compress enormously; noisy photographs and film grain barely compress at all.

Do not re-compress repeatedly

Each JPEG save discards a little more. Always compress from the original rather than from a previously compressed copy, or the artefacts compound.