Compress to Specific KB/MB
Compress any image to an exact file size target in kilobytes or megabytes. Binary-search precision.
- Free to use
- Browser-based processing
- No account required
- Files never uploaded
About Compress to Specific KB/MB
Compress to Specific KB/MB lets you hit an exact file size — say 100 KB for a form upload or 2 MB for an email attachment — instead of guessing at a quality slider. It runs a binary search on the encoder quality, re-compressing the image a few times until it lands as close as possible to your target without going over. All of this happens locally in your browser.
How to Use Compress to Specific KB/MB
- 1
Upload your image
Drop in a JPG, PNG or WebP file, or click to choose one from your device.
- 2
Enter the target size
Type the exact size you need and pick the unit — KB or MB. The tool will search for the quality setting that meets it.
- 3
Download the result
Save the file once it reaches your target. The final size is shown so you can confirm it fits your limit.
Frequently Asked Questions
How does it hit an exact KB target?
It uses binary search: it compresses at a mid-range quality, checks the resulting size, then raises or lowers quality and tries again, narrowing in until the file fits just under your target.
What if my target is smaller than the image can reach?
If the target is extremely small for the image's dimensions, the tool may also need to reduce resolution. It will get as close as possible and show you the final size.
Is there a maximum or minimum target?
You can target anything from a few KB up to several MB. Very small targets on large, detailed images will trade away visible quality to get there.
Do my files leave my device?
No. The entire compress-and-measure loop runs in your browser. Nothing is uploaded.