Skip to main content

Image Compressor

Most people compressing an image are not chasing a quality number, they are trying to clear a limit: 1 MB for an upload form, 500 KB for an email attachment, 200 KB for a page that has to load fast. Give this tool the budget and it searches the encoder for the highest quality that fits, then tells you the size it landed on and the quality it took. That search is several encodes of the same picture, and every one of them runs on your own processor — which is why there is nothing to upload here, and why the loop is capped rather than left to run until it converges.

Drop images to compress

Up to 30 files. Set a size budget and each file is re-encoded down to fit it — in this browser tab, with no upload.

Nothing queued yet. Drop images above, set a budget, and each one is re-encoded until it fits — your processor doing the work, on files that stay on your disk.

Design around the image, not just its size

The size limit was never the point. Moda designs the thing the file was for, and exports it to fit.

Try Moda free →

How the target-size search works

JPG and WEBP encoders take a quality parameter, but nobody can tell you which quality produces a 900 KB file — it depends entirely on the picture. A photo of a plain sky compresses to a fraction of what a photo of a forest does at the same setting. So the tool searches: it encodes once at full quality, and if that already fits you keep it. If not, it encodes at the quality floor to learn whether the budget is reachable at all, then bisects between the two, keeping the best encode that still fits. The loop is capped at ten encodes per file — enough to find the last quality step that fits without letting a large image spin your tab. How close that lands to your number is set by the picture, not the search: file size moves in steps as quality changes, and on noisy, detail-heavy images a single step can be several percent, so expect to land under the budget rather than exactly on it.

When the budget cannot be met

A 48-megapixel photo will not fit under 100 KB at any quality an encoder is willing to produce — past a point you are compressing detail that has to be there. Rather than hand you a file that misses the target without saying so, the tool stops at its quality floor, gives you the smallest file it actually managed, and says plainly that the budget was not reached. The lever that is left at that point is dimensions, not quality: halving an image's width and height quarters its pixel count and usually does more for the file size than any quality setting. That is what the resizer is for.

Quality mode, and when to use it instead

The slider mode does exactly one encode at the quality you pick, which is what you want when the goal is "make these twelve product photos consistent" rather than "clear this limit". 90% is visually indistinguishable from the original on almost any photograph; 80% is the web default and typically halves the file again; below about 60% you will see blocking around hard edges and text. Because every row shows the before and after size, the honest way to use it is to move the slider and watch, not to trust a remembered number.

Why PNG is not an output here

PNG is lossless: it has no quality parameter to search, so a target-size mode over PNG would be a lie. Compressing a PNG here means re-encoding it as JPG or WEBP, which is usually the right move for a photo that was saved as PNG by accident — the single most common reason an image is inexplicably 8 MB. It is the wrong move for a logo, a screenshot full of text, or a graphic whose see-through background has to survive: lossy encoders smear halos around crisp edges, and the JPG route resolves anything transparent to flat white. WEBP is the escape hatch from both, compressing hard while still carrying an alpha channel.

Frequently asked questions

Are my images uploaded to compress them?

No, and target-size mode makes the clearest case for why that is worth having. Getting under a budget can take ten encodes of one photo. Done as a web service, that is either your original sitting on somebody else's disk while their CPU grinds through the loop, or the same picture crossing the network again and again. Done here it is a local loop over a file that was only ever read from your disk. Traffic in the other direction is limited to one thing: if a HEIC turns up, the page downloads a WebAssembly decoder capable of reading it.

Why is my compressed file not exactly the size I asked for?

The budget is a ceiling, not a target to hit precisely, and the size of the gap is set by the image. File size does not move smoothly as quality changes — it steps — so the last setting that still fits can be a few percent under your number, and on grainy or highly detailed photographs noticeably more than that. Every row reports the size actually achieved, which is the number worth reading; chasing the remaining gap would cost more encodes for a difference no upload form distinguishes.

Does compressing an already-compressed JPG make it worse?

Yes, and it is worth knowing why. A JPG has already thrown away detail; re-encoding it decodes that result and throws away more, on top of compression artifacts the encoder now treats as real image content. One pass at a sensible quality is fine and is what everyone does. Repeatedly compressing the same file through any tool — this one included — visibly degrades it. Always compress from the best original you have.

What happens to transparency and metadata?

Pick WEBP and an alpha channel comes through compression intact; pick JPG and it cannot, so anything see-through lands as flat white. Metadata goes in both cases, because the encoder is handed decoded pixels and nothing else — an EXIF or GPS tag has no route to ride along. What does carry over is which way is up: a camera's rotation flag is resolved into the pixels before any compression starts.

How many files can I compress at once?

Thirty per batch, 50 MB apiece, 200 MB across the whole queue, and nothing over 60 megapixels once it has been decoded. The queue is worked through in order instead of all at once, which follows directly from the search: ten encodes multiplied by thirty photos, launched simultaneously, is exactly how a tab stops responding. Save any row on its own, or take the finished set as separate downloads.

Related tools

← All tools