Image Compressor — Hit a Target File Size

Compress an image to a size you actually need — type a target in KB, and the tool finds the best quality that fits without uploading anything.

or drag an image here

Choose an image to begin.

What this tool does

It compresses an image to a size you specify. Where a normal converter asks you for a quality setting and leaves you guessing what the file will weigh, this works the other way round: give it the cap — “under 200 KB” — and it searches for the best quality that fits. It tries a high quality first and steps down only as far as it must, and it reduces the pixel dimensions only once quality alone can no longer reach the target.

Why a target size, not a quality

The number in a quality field means nothing on its own — 75 is a different result for every image, the same way a temperature is meaningless without knowing what is being heated. A photo with fine texture and a screenshot of flat colour compress completely differently at the same setting. The only number that is meaningful is the one an upload form gives you, and that is the number this tool takes.

Dimensions or quality — which to give up

LeverWhat it costsWhen to use it
Lower qualityVisible blockiness and banding in the detailWhen the displayed size is fixed and you cannot shrink it further.
Smaller dimensionsLost resolution, but usually invisible at display sizeAlmost always first — it removes far more data per unit of visible harm.
WebP instead of JPEGA format a few very old tools cannot openWhenever you control the pipeline; it is smaller at the same quality.
PNG instead of JPEGA file several times largerOnly for sharp graphics, flat colour or transparency — never photographs.

The search, and why it is honest

The tool encodes the image at a series of candidates, each a combination of quality and scale, and keeps the one that fits your target with the highest quality. Dimension reduction is tried only after the quality range is exhausted, so you never lose resolution for a target the quality dial could have reached. If nothing fits — an extremely detailed image with a very small cap — it tells you so and offers the smallest result it found rather than silently missing the target.

Getting the best result

Start from the largest source you have, not one that has already been compressed twice; re-encoding a file that has already lost detail compounds the damage. If the image will be shown at a known size, set the max width to the size it is displayed at, or twice that for a retina screen — any more pixels are paid for and never seen. A JPEG has no transparency, so a transparent source is filled with white when it is encoded; use WebP or PNG when the background has to stay clear.

Frequently asked questions

Does compressing remove the photo metadata?

Yes. The compressor redraws the image into a canvas and re-encodes it, and no EXIF, XMP or colour profile is copied into the result. That is usually what you want before publishing — the location and camera details go with it — but keep the original if you need the capture data later.

Why is the compressed file larger than the original?

Almost always because the original was already compressed at a higher quality than the target you chose, or because the source is a PNG being converted to a format that handles photographs poorly. Re-encoding a JPEG at a higher quality than its source cannot recover detail, and it spends bytes describing the existing artefacts. If a smaller file is the goal, lower the target size or the dimensions; do not raise the quality.

Can I compress several images at once?

Not currently: the page handles one image at a time so the preview and the before/after size stay meaningful. For a batch, run each file through in turn; the target-size search takes the same path each time, so the results are consistent. If you need an automated pipeline, a local tool with the same encoder is the better fit than a manual page.

How do I get an image under a specific size?

Type the cap you have to meet — 100 KB, 200 KB, whatever the form demands — and the tool searches for it. It tries a high quality first and steps down only as far as it needs to, shrinking the pixel dimensions as a last resort. You get the best-looking result that still fits, rather than a file you have to guess at.

Why is quality lost?

JPEG and WebP compression discards detail to save bytes, and that is the point — a photograph carries far more information than the eye needs at the size it will be shown. A small amount is invisible; a lot shows as blockiness around edges and banding in smooth areas. The tool keeps the quality as high as it can for your target, and shows you the result before you save it.

Should I shrink the dimensions or lower the quality?

Dimensions first, when you can. Halving the pixel count removes three-quarters of the data and usually looks better than an aggressive quality setting at full size. Lower the quality when the dimensions are fixed — a photo that must be 1920 px wide for a template, for instance. The tool does the dimension reduction only when quality alone cannot reach the target.

What is the difference between JPEG, WebP and PNG?

JPEG is universally supported and lossy, with no transparency. WebP is newer, typically 25–35% smaller at the same quality, and supports transparency. PNG is lossless and ignores a quality setting entirely, which makes it the wrong choice for photographs but the right one for screenshots, logos and anything with sharp edges or flat colour.

Why does my PNG not get smaller?

Because PNG is lossless — there is no quality dial to turn, and lowering it does nothing. A photographic PNG is usually far larger than the same image as a JPEG or WebP; switching the output format is the single biggest saving available. Keep PNG only when you need a lossless copy or transparency.

Is my image uploaded?

No. The resizing and encoding happen on a canvas in your browser, and the result is downloaded locally. Nothing is sent to a server, so the file never leaves your device.

Sources

  • Google — WebP compression techniques and format overview.
  • ITU-T T.81 — the JPEG specification (lossy DCT compression).
  • W3C PNG Specification (Second Edition) — the lossless format and its filters.

Everything runs in your browser — your file never leaves your device.