Home / Compress / Compress Image to Target KB
EDIT & RESIZE

Compress Image to Target KB

Tell us the file size you need and we'll search for the JPG quality that gets you there — entirely in your browser.

BEFORE
AFTER

Drop a JPG or PNG here

or choose a file — nothing is uploaded to a server

KB
ORIGINAL
{{ fromSize }}
RESULT
{{ toSize }}
{{ resultMsg }}

{{ errorMsg }}

How the target-size search works

Instead of guessing a quality percentage and checking the result yourself, this tool runs a quick binary search: it tries a quality level, checks the resulting file size against your target, and narrows in from there — usually landing within a few KB of what you asked for within a handful of tries. The output is always a JPG, since JPG's quality control is what makes this kind of size targeting possible.

This is especially useful for upload forms with a hard size cap — a resume portal, an application form, a marketplace listing — where you need a specific ceiling rather than "as small as reasonable."

How the target-size search works

Rather than asking you to guess a quality percentage and check the resulting size yourself, this tool works backwards from the number you actually care about — it re-encodes your image at a series of quality levels, checking the resulting file size against your target each time, until it lands on the highest quality that still fits within your limit. That's a more direct way to hit a strict upload cap than manually nudging a slider.

Extremely small targets on a large, detailed photo may require quality low enough that some softening becomes visible — that's an inherent trade-off of squeezing a lot of visual information into very little data, not a limitation of the search itself. If a target can't be hit at all, resizing the image's dimensions down first, using the Resize Image tool, will always create more headroom than pushing quality any lower.

All processing stays on your device

Every quality level this tool tries, and the final comparison against your target size, happens using the Canvas API built into your browser — there's no server involved at any point in the search, which also means there's no upload wait before you see a result. Even trying dozens of quality levels in sequence typically completes in well under a second on most devices.

This makes the tool equally suited to a one-off ID photo for a form and a batch of images you're preparing for a strict upload system, since nothing about the process depends on a network connection once the page has loaded.

Frequently asked questions

{{ item.a }}

Related tools