Compress Image to Exact KB
Hit a precise file-size target — 50 KB, 100 KB, or any size you choose. Binary-search loop. Zero uploads.
Drag & Drop an image here
or click to browse (JPEG · PNG · WebP · GIF · BMP)
How does target-size compression work?
Standard image editors let you pick a quality percentage. This tool inverts that — you specify the file size you need (e.g. "exactly 50 KB for the email system") and the tool finds the highest quality that still fits. It uses a binary-search loop: test quality 0.5, check size, go up or down, repeat until within 2% of target. This typically converges in 7–12 iterations and takes under a second for a typical photo.
Why is 50 KB or 100 KB a common target?
Many CMS platforms, e-commerce systems, and email clients impose strict attachment or thumbnail size limits — commonly 50 KB for thumbnails, 100 KB for product images. This tool was built specifically to hit those limits without guessing the right quality slider position.
Frequently asked questions
How does it hit an exact file size?
Binary-search on JPEG/WebP quality: test → compare byte count → adjust → repeat until within 2% of target. Falls back to slight downscaling if quality alone cannot reach the limit.
Does it work for PNG?
PNG is lossless so quality adjustment has no effect. The tool converts to JPEG or WebP output for compression. If you need a transparent result, choose WebP.
Is the image uploaded anywhere?
No — everything happens in your browser tab via the Canvas API. No network request is made.
What is the minimum achievable size?
It depends on image content. Solid-colour images compress far more than detailed photos. The tool reports when the minimum quality is reached without hitting the target.