Skip to content
HNarzędzia
en
Categories

Compress an image to a specific size in KB

The upload form says 200 KB max and your photo is 3 MB? Enter the limit and the tool finds the highest quality that still fits. Your photos never leave your device.

  • Free
  • No sign-up
  • Private
  • Runs locally
KB

1 KB = 1000 bytes, so the result also fits forms that count 1 KB as 1024 bytes. If a form rejects a file that is right at the limit, set the limit a few KB lower.

JPG has no transparency, so transparent areas get a white background.

Drag & drop files here

or click to choose from your device

JPG, PNG, WebP · multiple files · you can also paste an image (Ctrl+V)

How to compress an image to a specific size

  1. 1.

    Set the limit

    Type the maximum size in KB or click 50, 100, 200 or 500 KB. The default is 200 KB.

  2. 2.

    Pick a format

    JPG is accepted almost everywhere. WebP usually looks better at the same file size and keeps transparency, but not every form accepts it.

  3. 3.

    Add your images

    Drop JPG, PNG or WebP files onto the box above, choose them from your device, or paste an image (Ctrl+V). Files are processed one after another.

  4. 4.

    Check and download

    Each file shows its size in bytes, its dimensions and whether it fits the limit. Download files one by one or all together as a ZIP.

How the quality is chosen

The image keeps its dimensions while the tool looks for the highest quality that fits your limit. It first saves the image at 95% quality. If that is too big, it tries 30%, then keeps halving the range until it finds the cut-off to within about one percentage point. Each image size gets at most 8 attempts, and every attempt measures the real size of the saved file.

A photo that already fits at 95% keeps that quality. If the file is already in the chosen format and under the limit, you get it back unchanged.

When the limit cannot be reached

Quality can only go so low. A 4000×3000 px phone photo will usually not fit into 50 KB even at 30% quality if the dimensions stay the same. In that case you get the smallest file the tool could make, clearly marked as over the limit.

Turn on Allow smaller dimensions to go further. The tool then scales the image down in steps, keeping the aspect ratio, and picks the quality again after each step. Every step shortens the sides by at least 15%, and by more when the file is several times too large. It stops once the file fits, when the longer side reaches 64 px, or after 12 steps.

If a form asks for exact dimensions, such as 600×800 px, set them first with the image resizer or crop image tool, then bring the file size down here with resizing turned off.

KB vs KiB, and why a small margin helps

This tool counts 1 KB as 1000 bytes, so a 200 KB limit means at most 200,000 bytes. Some forms and programs count 1 KB as 1024 bytes (KiB). For them, 200 KB is 204,800 bytes, so your file fits with room to spare. Windows File Explorer also shows sizes in 1024-byte units, which is why a 200,000-byte file appears there as about 195 KB.

Some forms require the file to be smaller than the limit and reject one that is exactly at it. If an upload fails right at the edge, set the limit a few KB lower, for example 190 instead of 200.

JPG or WebP, and what happens to transparency

Almost every form and system accepts JPG. JPG has no transparency, so transparent areas in PNG and WebP files get a white background. WebP usually keeps more detail at the same file size and supports transparency, but some forms, especially older ones, only take JPG. The WebP option is only available in browsers that can save WebP files.

Frequently asked questions

Will every image fit my limit?

+
Not always. With a low limit and large dimensions, even the lowest quality may not be enough. The tool then gives you the smallest file it could make and marks it as over the limit. Turn on “Allow smaller dimensions” or raise the limit.

Why is my file smaller than the limit?

+
The tool picks the highest quality that fits. One step higher would go over the limit, so some room is left. With a generous limit, the photo at 95% quality is simply smaller than the limit.

What if a form sets both dimensions and file size?

+
Set the dimensions first with the image resizer, or use the passport photo maker for ID photos. Then bring the file size down here with “Allow smaller dimensions” turned off, so the dimensions stay as you set them.

How is this different from the image compressor?

+
In the image compressor you set the quality and see what size comes out. Here you set the target size and the tool picks the quality.

Are my images uploaded anywhere?

+
No. Everything runs in your browser. A newly saved file has no EXIF metadata, including GPS location. If a file already fit the limit and was kept unchanged, its metadata stays. You can strip it with remove EXIF data.

Can I compress several images at once?

+
Yes. Add as many files as you need and they are processed one after another with the same limit. Download them one by one or together as a ZIP.

Guides using this tool

Updated: