11MB Compress
Exact Size Compression

Compress Images to Exact File Size

Compress JPG, PNG, and WebP images to a specific file size: 50KB, 100KB, 200KB, 500KB, or any custom target. Perfect for email attachments, forum uploads, and job applications. Free, private, and browser-based.

When to use exact size compression

Email attachments

Many email providers limit attachments to 25MB, but some corporate systems cap at 5MB or even 1MB per image.

Forum & social uploads

Forums often limit uploads to 100KB-500KB. Pick the right preset to match the requirement exactly.

Quality vs size

The compressor uses binary search to find the highest quality that fits your target. Minimal visible loss.

Batch compression

Upload up to 20 images and compress them all to the same target size in one go. Files already under target are skipped.

Why exact file size matters

Many websites, email providers, and application forms enforce strict file size limits. Job applications often require photos under 100KB or 200KB. Government forms may cap uploads at 50KB. Forum avatars and profile pictures typically need to be under 500KB. Our exact-size compressor solves this by targeting the precise KB value you need, rather than a rough quality slider you'd need to check and re-run by hand.

Unlike simple quality sliders, this tool uses a binary search algorithm to find the highest possible quality level that fits within your target size. It tries multiple quality settings automatically, converging on the best result in just a few iterations — each iteration re-encodes with `canvas.toBlob()` at a candidate quality, measures the resulting byte size, and moves the search bound up or down depending on whether that came in over or under target. For very small targets where quality alone can't get there (say, 20KB on a busy 4000px-wide photo), it also proportionally reduces the pixel dimensions so the target stays achievable rather than bottoming out at unusable quality.

All compression happens locally in your browser. Images are never uploaded to any server. The tool supports JPEG, PNG, WebP, GIF, and BMP, and can process up to 20 images in a single batch.

  1. 1Upload your image. Drag and drop or click to select a JPG, PNG, WebP, GIF, or BMP image from your device.
  2. 2Pick a target size. Select a preset target (50KB, 100KB, 200KB, 500KB, 1MB) or enter a custom KB value.
  3. 3Download compressed image. Click Compress and download your image at the target size. The tool finds the highest quality that fits.

Which target for which requirement

SituationSettingWhy
A passport or visa photo capped at exactly 50KB or 100KBUse the exact preset, don't round down furtherThese portals typically reject anything over the stated limit but don't reward going smaller — hitting just under the cap preserves the most quality for a strict requirement.
A job application form with a 200KB headshot limit200KB presetAt typical headshot resolutions (under 2000px), 200KB still leaves quality high enough that compression artifacts aren't visible at the size these forms usually display the photo.
A forum avatar or profile picture50-100KBAvatars render small (often under 200px) almost everywhere they're shown, so there's no visual reason to spend more bytes than that.
An image for a print-quality archive that also needs a size capThe largest target the form allows (e.g. 1MB, not 100KB)Print reveals compression artifacts far more than a screen does — take the least aggressive option a hard limit permits.
Dozens of product photos that must each individually clear a marketplace's per-image capBatch mode, target set onceEvery image is searched to the same KB target independently, and ones already under the target are left alone — you don't have to check file sizes by hand first.

Known limits

Extremely small targets (under ~15-20KB) on a busy, high-detail photo may not be reachable without visible blocking, because there's a practical floor below which JPEG quality and downscaling can no longer hide the compression. The tool gets as close as it can and shows you the actual result rather than a target it silently missed.

The binary search adds a handful of extra encode passes compared to a single fixed-quality export, so exact-size compression is marginally slower than the general 1MB/2MB compressor — usually still under a second per image on a typical laptop, but noticeable on very large batches on an older device.

Frequently asked questions

What target sizes are available?

Preset targets include 50KB, 100KB, 200KB, 500KB, and 1MB. You can also enter a custom KB value for any size between 1KB and 10MB.

Will my image lose quality?

The tool uses a smart binary search algorithm to find the highest possible quality that fits within your target size. For larger targets like 500KB or 1MB, quality loss is typically imperceptible. Smaller targets like 50KB may require more aggressive compression.

What image formats are supported?

We support JPEG, PNG, WebP, GIF, and BMP input formats. Compressed output uses JPEG for best size reduction, including for PNG images.

Can I compress multiple images at once?

Yes. Upload up to 20 images in a single batch. Each image is compressed individually to the same target size. Files already under the target are skipped automatically.

How does this tool hit an exact KB target without me guessing a quality percentage?

It runs a binary search: encode at a middle quality value, check the resulting byte size against your target, then narrow the search range up or down and re-encode — typically 5-8 passes converge on the highest quality whose output size is still at or under your target. This all happens in the Canvas API inside your browser; no size checking or re-encoding involves a server round-trip, which is also why it's fast even over a slow connection.

Learn more

From the blog

Compress images for the web

How to shrink JPG, PNG, and WebP files without visible quality loss.

Related tools