Image Compressor

Compress image to exact KB

Enter a target size in KB. The tool binary-searches quality (and drops dimensions if needed) until your image is genuinely under that target — not just close. Runs entirely in your browser.

KB

WebP is typically 25–35% smaller at the same quality — useful when the target is aggressive.

Runs entirely in your browser — nothing is uploaded.

Why this exists

Most "compress to N KB" tools apply a fixed set of quality and dimension settings and hope the output lands close to the target. That's fine for casual use, but it fails the case where you need to guarantee the file is under a specific byte limit — a form upload capped at 100 KB, a corporate email attachment ceiling of 2 MB, a job-portal photo spec that hard-rejects anything over 50 KB.

This tool iterates. It picks a starting quality, encodes, checks the byte count, then binary-searches until it finds the highest quality that lands under your target. If the highest-quality version is still too big, it drops the image dimensions by 20% and repeats. In practice the tool converges in 3-6 attempts.

When to use this vs. the preset target-size pages

The preset pages (/compress-image-to-100kb, /compress-image-to-500kb and so on) are optimised for one-click use — drop and go. This tool is a better choice when the target size is a hard requirement rather than a rough goal, or when the target isn't one of our standard presets (17 KB, 340 KB, 1.8 MB — anything specific).

Related tools

Your images stay on your device. Nothing is uploaded.