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.

Common targets

Type any target in the box. The usual limits have shortcuts: 50 KB, 100 KB, 200 KB, 500 KB, 1 MB and 2 MB. For an online form, type the exact limit the form states (17 KB, 340 KB, anything). This tool counts 1 KB as 1,024 bytes; if a form counts 1 KB as 1,000 bytes, aim slightly lower (for example 48 KB for a 50 KB limit).

Related tools

For the detail behind the search, read how to compress an image to an exact KB target.

Your images stay on your device. Nothing is uploaded.

Supported formats and how processing works

Files you can open
JPG, PNG and WebP, up to 25 MB each. iPhone HEIC/HEIF photos open only in the HEIC to JPG converter. PDFs open in the PDF to image tool.
Files you can save
JPG, PNG and WebP. WebP and AVIF output depend on your browser's encoder (in our tests, Chrome could not create AVIF). If your browser can't produce the format you picked, the tool tells you instead of saving a different format under the wrong file extension.
Where the work happens
In your browser, using its built-in canvas image encoder. The tools contain no upload step, so your image is not sent to our server. Our analytics (Google Analytics with Consent Mode) records usage numbers such as file size and format, never the image itself.
What changes in the file
The image is re-encoded, so camera metadata (EXIF, including GPS) is not carried over. JPG has no transparency, so transparent areas become white. PNG is lossless: to shrink one, reduce its dimensions or convert it to WebP.