Skip to main content
Support
Image Tools / Compress Image to Exact File Size (KB)

Browse by category

All categories

Compress Image to Exact File Size (KB)

Hit the exact KB limit for exam portals, visa forms, and job applications. Binary-search quality + auto-downscale runs in your browser — your photo never leaves your device.

1
Upload images
Drop one or many images (JPEG, PNG, WebP, GIF, BMP, TIFF, AVIF, HEIC), or click to browse. Up to 50 MB per file.
2
Pick target size
Select a preset (20 KB / 50 KB / 100 KB / 200 KB / 500 KB / 1 MB) or type a custom KB value.
3
Choose output format
Pick JPEG (widest support), WebP, or AVIF (highest quality per byte where the browser can encode it).
4
Compress and download
Click Compress. Each file lands at or under the target — download rows individually or as a single ZIP, with old→new size shown per file.

Frequently Asked Questions

How does the tool reach an exact KB size?

It runs a binary search across JPEG/WebP quality levels (7 iterations) to find the highest quality whose encoded size stays at or below your target. If even the minimum quality exceeds the cap, the image dimensions are scaled down by 15% per step until the file fits.

What image formats are accepted?

Inputs include JPEG, PNG, WebP, GIF, BMP, TIFF, AVIF, and HEIC/HEIF (HEIC is decoded automatically). Output is JPEG, WebP, or AVIF — the lossy formats whose quality the binary search can tune. AVIF and WebP appear only when your browser can encode them.

Will my image be uploaded to a server?

No. All compression runs via the Canvas API in your browser tab. Your photo never leaves your device.

Can I compress multiple images at once?

Yes. Drop several images and they are all compressed to the same target size. The results are packaged into a single compressed.zip download.

Why is the actual size slightly below (not exactly at) the target?

The binary search finds the highest quality whose output is at or under the target — it cannot control the encoder to produce exactly N bytes. The result is always at or below the cap, never over.

Tool history

Updated Jun 3, 2026 · 3 updates
  • Jun 3, 2026featper-tool OG images for all 75 tools + lengthen 20 short metas (#614)
  • Jun 3, 2026fixdefinitional capsules + privacy-policy accuracy (#613)
  • Jun 1, 2026featrebuild a/v tools on mediabunny + image-tool parity + visual-qa pass (#563)
See full history →
This tool is free thanks to our sponsors. Support Loft Tools