Compress to a target size
Set a size limit in KB and the tool searches the quality range for the best image that fits under it. Runs entirely in your browser.
About this tool
Some limits are hard: a job portal that rejects a CV photo over 100 KB, a government form capped at 200 KB, a forum avatar that must be under 50 KB. Guessing at a quality slider until the number happens to fall below the cap is slow and imprecise.
This tool works backwards from the target instead. It encodes the image repeatedly, narrowing the quality range by binary search, and keeps the highest quality version that still fits under your limit — usually in under a dozen attempts, all of them in your browser. If quality alone cannot get there, it scales the dimensions down in steps and tries again, and tells you when it has had to do that.
For free-form compression where no number has been imposed on you, the standard compressor gives you the slider directly.
How to use it
- 1
Upload your image
Add the photo that has to fit under a limit.
- 2
Set the target size
Pick 100 KB, or type any target in kilobytes. Choose JPG for maximum compatibility or WebP to hit smaller targets with better quality.
- 3
Let it search
The tool tries a series of quality settings and reports the result of each, keeping the best fit.
- 4
Download the result
Save the largest file that still fits under your limit.
Frequently asked questions
How do I compress an image to exactly 100KB?
Set 100 KB as the target and let the search run. It returns the highest-quality encoding that lands under the limit, rather than an arbitrary quality level that may be far below it. Note that "exactly" is not achievable with lossy encoding: the goal is as close under the cap as possible.
What if the target cannot be reached?
When even the lowest quality cannot fit, the tool reduces the pixel dimensions in steps and searches again, telling you the dimensions it settled on. A 4000 px photo simply cannot be 20 KB while staying 4000 px wide.
Should I choose JPG or WebP?
JPG if the file is going into a form or an old system that might not accept WebP. WebP if the destination accepts it: at a fixed target size it looks noticeably better, because it needs less data for the same quality.
Is the quality loss visible?
It depends on the gap between the original and the target. Cutting a 2 MB photo to 500 KB is typically invisible; cutting it to 50 KB is not. The preview shows the actual result at each step so you can judge before downloading.
Read more on this
Last reviewed by the Kobra IMG team.