Skip to main content

Reduce Image Size to a Target in KB

Enter a size limit, such as the maximum an upload form accepts, and the tool searches for a quality and size that fit under it.

Upload an image to compress

Drag and drop files here, or click to browse

Your images are processed in your browser and are not uploaded to Image York.
You retain full ownership of your images. Image York does not store or claim rights. View License

When to use a size target instead of a quality slider

Forms for job applications, exam registrations, visa portals and support tickets often state a maximum like "under 200 KB" or "max 1 MB". With a quality slider you would compress, check the size, adjust and try again. Here you type the limit once and the tool does the trial and error.

For one of the most common limits there are ready-made pages: 20 KB, 50 KB, 100 KB and 200 KB. This page accepts any value from 5 KB to 20,000 KB.

How the search works

The tool first draws your image at full size (anything longer than 4096 pixels on its long side is reduced to 4096 px) and encodes it at quality 0.8. If that file is already at or under the target (and not larger than your original), you get it straight away. If not, it repeats up to 10 times. On each pass it multiplies the quality by 0.95 (0.85 for PNG) and, because the first attempt was too big, also shrinks the width and height to 95% of the previous pass.

Ten passes is the limit. After all ten, the width and height have dropped to about 60% of where they started and the quality setting to about 0.48. If the file is still too big at that point, you get the last attempt and a note saying the target was not reached.

KB here means 1024 bytes, which is how most operating systems and upload forms measure it. If a form says "100 KB" and you want a margin for error, enter 95.

Settings

  • Target size (KB): the maximum size of the output.
  • Output format: WebP (default), JPG or PNG. Check what the destination accepts. Many government and exam portals only accept JPG, in which case choose JPG even though WebP would fit more detail into the same size.
  • File name: optional. Some forms reject names with spaces or special characters; a short name like photo-id.jpg avoids that.

Why very small targets change the dimensions

File size is roughly the number of pixels multiplied by how many bits the encoder spends on each one. If you keep a 4000 x 3000 photo (12 million pixels) and ask for 100 KB, the encoder has 819,200 bits to spend, which is under 0.07 bits per pixel. No setting makes that look good, so the tool shrinks the image while it lowers the quality.

You will usually get a better-looking result by choosing the dimensions yourself first. A passport-style photo that will be shown at a few hundred pixels does not need to stay 4000 px wide. Resize with the Image Resizer, then come back and set the size target.

If the target is not reached

  • You will see a note saying the file could not be brought under the target within 10 attempts, along with the closest result.
  • Resize to smaller dimensions and run it again.
  • Switch from PNG to JPG or WebP. PNG is much larger for photos.
  • Crop away empty background with the Crop tool. Fewer pixels, fewer bytes.

Where the processing happens

All attempts run in a Web Worker in your browser. Your photo, which for application forms is often an ID or document, is not uploaded to Image York.

Questions about this tool

Is 1 MB 1000 KB or 1024 KB?

This tool uses 1 KB = 1024 bytes and 1 MB = 1024 KB. Some websites use 1000. If you are close to a limit, leave a small margin.

Will the photo keep its dimensions?

Only if the target can be met by lowering quality alone on the first try. Otherwise each extra attempt also reduces width and height by 5%.

A form says my photo must be under 200 KB. How do I do that?

Type 200 in the target size box, choose the format the form accepts and press Compress Image. The tool tries lower quality, and smaller dimensions if needed, until the file fits. To be safe, type a little less, such as 195.

The result looks blurry. How can I get a sharper photo at the same size?

Resize the photo to the size the form actually shows before compressing. A smaller photo needs fewer bytes, so the tool can keep the quality higher.

It says the target could not be reached. What now?

Make the photo smaller in pixels with the Image Resizer, crop away empty background, or switch from PNG to JPG or WebP. Then try again.

The form rejects my file name. Can I change it?

Yes. Type a short name without spaces or special characters, such as photo-id, in the file name field before downloading.

The form only accepts JPG. Which format should I choose?

Choose JPG in the output format menu. WebP can fit a little more detail into the same size, but a form that only accepts JPG will reject a WebP file.