Skip to content
Server-sideDeleted in 30 minutes

Compress Images to a Target Size

Type the size you need — 200 KB, 1 MB, 20 KB — and each image is encoded repeatedly until it fits, keeping the highest quality that still meets your budget. Quality is reduced first and dimensions only if quality alone cannot get there, which is the order that leaves a photo looking like a photo. All of the search is done for you rather than left as a slider to fiddle with.

Use this without the search next time. Prathom Workbench puts Prathom's tools in your toolbar.

Add to Chrome — free

What it does

  • Compress to an exact target file size
  • Automatic quality search, highest that fits
  • Falls back to reducing dimensions when needed
  • JPEG, WebP, and PNG output
  • No watermark, no account, deleted within 30 minutes

How to use Image Compressor

  1. 1

    Set your budget

    Type the size limit you have been given. A plain number is read as kilobytes, so "200" and "200 KB" mean the same thing.

  2. 2

    Pick an output format

    JPEG is the safe default and accepted everywhere. WebP produces noticeably smaller files at the same quality if the destination supports it.

  3. 3

    Add your images

    Drop the files in. Each one is compressed independently to the same target, so a batch of mixed sizes all come out under the limit.

  4. 4

    Check the notes

    Every result reports the quality it settled on, and says so explicitly if the image had to be scaled down or if the target could not be met.

How it works

There is no formula that turns "make this 200 KB" into a quality setting. Compressed size depends on what is in the picture — a photograph of a plain sky and a photograph of a forest at identical dimensions and quality can differ by a factor of five. The only reliable method is to encode, measure, and adjust.

The quality search. The tool encodes at 95 percent quality first. If that already fits, it stops there, because there is no reason to degrade an image that was never too large. Otherwise it encodes at the 20 percent floor to learn whether the target is reachable at these dimensions at all. If it is, a binary search narrows the range, remembering the best result that fits, and converges in about six more encodes. This is why compression takes a moment per image rather than being instant: it is doing the work eight times.

The dimension fallback. When even 20 percent quality is too large, no quality setting can succeed, so the size itself has to come down. The scale factor is the square root of the size ratio, because file size tracks pixel count rather than edge length — halving the bytes means roughly 71 percent on each side. Then the quality search runs again at the new size. Up to four such rounds are allowed.

The floor. Quality below 20 percent produces the blocky, smeared look that makes an image unusable, and shrinking below a tenth of the original is not a compression result anyone wants. Hitting either limit ends the search and the result is labeled as not having reached the target, rather than being disguised as a success.

When you'd use this

Upload limits are the reason most people arrive here: a form that refuses anything over 200 KB, a support ticket capped at 1 MB, an application portal with a strict figure and no explanation of how to meet it. Typing the number from the error message is faster than guessing at a quality slider.

Email is the second case. Attachment limits are usually generous now, but a thread with a dozen photos attached still bounces, and recipients on metered connections notice.

The third is web performance. Images are typically most of a page's weight, and the difference between a 2 MB hero photo and a 180 KB one is the difference between a page that loads instantly on mobile data and one that does not. If you are working on that, resize to the largest size the layout actually displays before compressing — the two together achieve far more than either alone.

The honest limits

This tool re-encodes images. It does not do the clever things a dedicated optimizer does: no MozJPEG trellis quantization, no palette reduction for PNG, no subsampling decisions per image. A specialist command-line tool will beat it, sometimes by 10 to 20 percent at equal quality.

What it offers instead is that it hits the number you asked for. Most compressors give you a quality slider and leave you to guess which setting lands under 200 KB; this one searches for the highest quality that fits and tells you what it found. There is no watermark, no account, and no file-count limit.

The file is uploaded to do that, and deleted within thirty minutes — the upload as soon as the search finishes, the result on a timer swept every five minutes. If a photograph is sensitive enough that this matters, cwebp, jpegoptim and ImageMagick all run on your own machine and are free.

Examples

Meeting a 200 KB upload limit on a job portal

passport-photo.jpg — 1.8 MB, 2400 x 3000 Target: 200 KB, JPEG
passport-photo.jpg — 198 KB, 2400 x 3000 quality 71%

No scaling was needed here, which is the outcome you want. The search started at 95% quality, found it far too large, checked the 20% floor to confirm the target was reachable at all, then narrowed to 71% in a few more encodes. Full resolution is preserved because quality had enough room.

Squeezing a screenshot down to 20 KB

dashboard.png — 640 KB, 1920 x 1080 Target: 20 KB, JPEG
dashboard.png → dashboard.jpg — 19 KB, 1152 x 648 scaled to 60% to fit the budget · quality 45%

20 KB is not reachable at 1920px for a detailed screenshot at any quality that remains readable, so after exhausting the quality range the tool reduced the dimensions and searched again. The note tells you it did this, because a silently shrunken image is a nasty surprise when you paste it somewhere.

Frequently asked questions

Why did my PNG get bigger instead of smaller?

PNG is lossless, so it cannot be compressed by lowering quality — the slider and the size target genuinely do nothing to it. Worse, converting a photograph to PNG usually inflates it, because PNG is designed for flat colors and sharp edges rather than continuous tone. For photographs choose JPEG or WebP.

How does it decide between lower quality and a smaller image?

Quality first, dimensions second. It searches the quality range down to a floor of 20 percent, and only if the target is still out of reach does it shrink the image and search again. That order matters: a photo at 60 percent of its size with decent quality looks considerably better than the same photo at full size with quality low enough to hit the same byte count.

Will it ever give me a file over the limit I set?

Only if the target is genuinely impossible, and it tells you when that happens rather than quietly handing back something too big. The note on that result says the target could not be reached and reports what it actually achieved, so you can decide whether to accept it or lower the resolution yourself first.

Is WebP actually worth choosing over JPEG?

At the same visual quality WebP files are usually 25 to 35 percent smaller, which is a real saving. Every current browser displays it. The catch is elsewhere: some job portals, government forms, older printing services and a few chat apps still reject the format outright. If the destination is a website, choose WebP. If it is a form, choose JPEG.

Does compressing twice make things worse?

Yes, for JPEG and WebP. Each pass discards detail, and the losses stack, so compressing an already-compressed image degrades it further even at a high quality setting. If you need several versions, always go back to the original file rather than re-compressing an output from a previous run.