Compress an image to an exact size

Forms rarely ask for a smaller photo. They ask for one under 100 KB, or between 20 KB and 50 KB. Give this the limit and it finds the best quality that fits, without you guessing at a slider.

Compress to a sizeHit an exact KB limit for a form.It runs inside this tab, so nothing you add is uploaded.
Next?Compress imageResize imagePassport photo
Your file never leaves this device. How that works

How to compress an image to an exact file size

STEP 1

Add your photo

Drop it above or pick it from your files. Add several if you have a set to get through, they are all handled on your own device.

STEP 2

Type the limit

Choose one of the usual limits, or type the exact number of kilobytes the form asks for. If it also demands a minimum size, tick the box and set that too.

STEP 3

Save it

You get the finished size and the pixel dimensions. If the limit turned out to be impossible, it says so rather than handing you a ruined picture.

Why a quality slider cannot answer this

There is no fixed relationship between a quality setting and a file size. The same setting that takes a plain headshot to 60 KB will leave a detailed street scene at 400 KB, because compression works by discarding detail and one of those pictures has far more detail to discard.

So guessing at a slider means exporting, checking the size, adjusting and exporting again. This does that loop for you, encoding the image several times and narrowing in on the highest quality that still fits. It usually settles in well under a second.

When the limit is very small, quality alone eventually stops helping and starts producing a smeared mess. At that point fewer pixels beat lower quality, so the picture is scaled down as well and the result tells you that it was. If even that cannot reach the number, you are told plainly instead of being given something unusable.

Questions

Is my file uploaded anywhere?

No. The work happens inside this tab, on your own machine. Open your browser's network tab while you use the tool, there is no request carrying your file.

Is there a file size limit?

Practical limits depend on the tool, browser and available device memory. Large files can fail even when no explicit limit is shown. Keep an original and use a smaller job if this device cannot finish it.

Do I need an account?

No, and there is no daily limit either. There is nothing to sign up for.

Why is my result a little under the limit rather than exactly on it?

Because encoders cannot be told to produce an exact byte count. It finds the highest quality that lands under your limit, which is what a form is checking for.

Can I use PNG?

Not for a size target. PNG compression is lossless, so there is no quality to trade away. Choose JPG, which is what most forms want anyway.

What if the form wants a minimum size too?

Tick the second box and set the floor. It will stop as soon as it lands inside the range instead of squeezing the file as small as it can.

How it finds the right quality

Instead of guessing, the tool tries different quality levels and keeps the highest one that still fits under your limit. It does this by testing quality settings between 95 and 8 percent, narrowing down in about six passes, so you get the best looking file that fits.

If even the lowest quality is too big, it makes the picture smaller in pixels, up to four times, and tries again. The result is shown with its before and after size and its new dimensions, and you are told when it had to be resized.

For forms with strict limits

Choose a limit from 20 KB to 2 MB, or type an exact number of kilobytes. Some forms also require a minimum size, and you can set that too, though it is best effort and never allowed to push the file over the maximum.

JPG is the default and the safe choice, because some government and university forms reject WebP. If a limit cannot be reached, you get the smallest file the tool could make with a message to raise the limit or crop the image first. Transparent areas become white in JPG.

Next, you might want to

Compress imageJPG, PNG and WebP, one or a hundredResize imageExact pixels or size presetsPassport photoDocument-size and head-position presetsConvert formatJPG, PNG and WebP, both directions

Guides for compress to a size

All guides
get a JPG under 200 KBForms and job portals often cap photos at 100 KB, 200 KB or 500 KB. Here is how to get under the limit while keeping the picture usable.get a photo under 100 KB for a formForms ask for a photo under 100 KB, 50 KB or 20 KB and reject anything larger. Here is how to hit the number exactly, on your own device.prepare a photo and signature for an exam formExam and recruitment forms ask for a photo and a signature at separate exact sizes. Here is how to prepare both without uploading either.