webtools

Compress Image to Size

Private: the search runs on your device, nothing is uploaded

Type the size limit you have to meet, for example 100 KB, then drop an image in.

Type the limit a form has given you, drop your photo in, and get a file underneath it. The quality is found by searching rather than guessed, so the result is as good as it can be while still fitting, and if the limit cannot be met the page says so instead of handing you something too big.

About fitting an image to a size limit

Upload forms set hard limits. A government portal wants the photo under 100 KB, a job application wants it under 200 KB, an exam form wants 50 KB, and none of them tell you how to get there. The usual advice is to open a compressor, drag a quality slider to a guess, look at the number, and drag again. That is the wrong way round, because the one thing you actually know is the number you have to hit.

So type the number. The page encodes your image several times at different quality settings and narrows in on the highest quality that still comes in under your limit, usually within seven attempts. The result is the best looking file that fits, rather than the first one that happened to be small enough.

A limit can be impossible. A twelve megapixel photo will not go under 20 KB while it is still twelve megapixels, so when quality alone runs out the tool reduces the pixel dimensions as well, which is the only thing left that works. If even that cannot reach the number, it says so plainly and tells you the smallest it managed. Handing back a file over the limit would waste your time twice, once here and once at the form that rejects it.

If your limit is one of the usual ones there is a page that opens already set to it, with nothing to type: 20 KB, 50 KB, 100 KB, 200 KB and 1 MB. They are this same tool, so anything below applies to all of them.

How to compress an image to an exact size

  1. Type the limit into Must be under and pick KB or MB.
  2. Drop your images on the box, click to choose them, or paste a screenshot onto the page. As many as you like, all brought under the same limit.
  3. Leave the format on JPEG unless the form asks for something else. It is what almost every upload form expects.
  4. Check the result against the original in the two panes, and the exact figures underneath.
  5. Press Download. Several images come back as one ZIP.

Common questions about hitting a size limit

Where does the compressing actually happen?

On your own device. Every attempt is encoded by your own browser, which is also why the search is quick: there is no round trip to a server between tries. Nothing is sent, logged or stored, which matters here because the photos people squeeze into forms are usually identity documents.

Why does it try several times?

Because there is no formula that turns a target file size into a quality setting. How much a picture compresses depends entirely on what is in it: a flat graphic and a detailed photograph at the same quality come out at wildly different sizes. The only reliable way is to encode, measure, and narrow in, which is exactly what happens here.

Why is my image not exactly at the limit?

Because under the limit is what matters and over it is a rejection. The search keeps the best result that is genuinely underneath rather than the closest one, so you will usually land a little below the number rather than a few bytes above it. A file one byte over a hard limit is refused exactly as firmly as one twice the size.

What if the limit cannot be met?

The page tells you, and tells you the smallest it managed. First it drops the quality as far as it goes, and then, if you have left the shrink option ticked, it reduces the pixel dimensions too, since a smaller picture is the only thing that reliably makes a smaller file. If it still cannot reach your number, crop the picture to just the part you need and try again.

JPEG or WebP for a form?

JPEG, unless the form specifically accepts WebP. WebP reaches the same size at noticeably better quality, but plenty of upload forms and older back office systems still reject it, and a rejected file is worse than a slightly softer one. PNG is not offered at all here: it is lossless, so it has no quality setting to search on and cannot be aimed at a size.

Next

Related tools

All Image tools