Skip to content

Compress Image to a Target Size

Pick a file-size cap — 100 KB, 1 MB, or any other figure — and get an image that fits, without uploading it. The tool keeps as much quality and as many pixels as the budget allows.

The result will be at or under this size when the tool can manage it. 1 KB is 1,000 bytes and 1 MB is 1,000,000 bytes, so a file that meets the target also passes forms that count a kilobyte as 1,024 bytes.

Original

No image

Compressed

No image

Stop guessing the quality slider

Forms and inboxes care about the number of kilobytes, not about a 0–100 quality scale. This tool searches that scale for you, and only shrinks the width and height if quality alone can't get there. If the smallest file this browser can make is still too big, you get that file plus a clear message — not a silent failure.

How to compress an image to a target size

  1. Select an image. Choose a JPG, PNG, WebP, GIF or BMP (or an AVIF your browser can display).
  2. Enter the target size. Type a number and pick KB or MB. 1 KB is 1,000 bytes; 1 MB is 1,000,000 bytes (1,000 KB). The result stays at or under that many bytes, so it also passes forms that count a kilobyte as 1,024 bytes.
  3. Pick a format. JPG is the usual choice for photos. WebP is often smaller if the destination accepts it. PNG can only shrink by using fewer pixels.
  4. Compress and download. The tool searches quality, then size if needed, shows the final figure, and tells you if the target was missed.

Ready-made targets

If you already know the cap, these pages pre-fill it and add short notes about typical uses (they are not official requirements): 20 KB, 50 KB, 100 KB, 200 KB, 500 KB, 1 MB.

What this tool doesn't do

It doesn't enforce passport or visa photo rules, official backgrounds, or exact pixel dimensions. For a specific crop or aspect ratio, use the crop tool first. To pick quality and size yourself, use the Image Compressor.

Related tools and guides

Compress to size FAQ

Are my images uploaded?

No. The image is decoded, compressed and, if needed, resized entirely in your browser.

How do you count KB and MB?

1 KB is 1,000 bytes and 1 MB is 1,000,000 bytes. A result at or under that figure also fits forms that use the 1,024-byte (KiB) definition, because 50,000 bytes is less than 50 × 1,024 and 1,000,000 bytes is less than 1,048,576.

How does it decide quality versus size?

It first binary-searches the quality setting at the original dimensions. If even the lowest quality is still too big, it then searches a smaller size, and finally searches quality again at that size so the picture stays as sharp as the budget allows.

What if my file is already under the target?

The download is the original file, unchanged: same bytes, name and type. The tool will not re-encode it, because re-encoding a small JPEG can make it larger.

What if it can't hit the target?

If a smaller encoding exists, you get that file and a clear message that the target was missed. That can happen with a tiny budget and a complex image, or with PNG, which can only shrink by resizing. If every attempt would be larger than the original, you get the original file back. The tool never returns a file bigger than the one you chose.

Which format should I pick?

JPG is the most compatible. WebP is usually smaller at the same quality and is fine if the destination accepts it. PNG is lossless, so the only way to cut its size is to use fewer pixels — it is a poor choice for squeezing a photograph into a small cap.

What targets do you offer as dedicated pages?

20 KB, 50 KB, 100 KB, 200 KB, 500 KB and 1 MB, each with its own short guide. They all use this same tool with the target pre-filled.