Compress image to a target size
Give it a size limit — 100KB, 200KB, whatever the form demands — and it finds the best quality that fits.
By opening this website or using its tools, you agree to our Terms and Privacy Policy.
The image is encoded repeatedly at different quality settings until it lands just under this size. Output is JPG, which is the only widely accepted format with a quality dial fine enough to hit a byte target.
or drag them here
JPG, PNG, WEBP, or HEIC · batch supported
Your file never leaves your browser during processing
How it works
To compress an image to a specific file size such as 100KB, drop it onto this page and enter the limit — the image is encoded repeatedly at different quality settings until the best-looking version that fits under your number is found.
Most compressors give you a quality slider and leave you to guess. That is fine when you just want a smaller file, and useless when a form has told you the photo must be under 100KB — you end up dragging the slider, exporting, checking the size, and going back again. This tool inverts it: you state the limit, and it works out the quality.
The search is real, not estimated. The image is encoded to JPG at a mid-range quality, the resulting size is measured, and the quality is adjusted up or down from there — a binary search that converges in about seven attempts. Every one of those attempts is an actual encode, which matters because the relationship between JPG quality and file size depends entirely on what is in the picture. A flat screenshot and a noisy photograph at the same quality setting can differ in size by ten times, so any formula that guessed a quality from a compression ratio would routinely miss the one number you specified.
If the smallest usable quality still overshoots — common when you ask a 12-megapixel phone photo to fit in 50KB — the tool starts reducing the pixel dimensions too, in steps, and tells you it did. That order is deliberate: quality is given up first because dropping resolution is the more visible loss of the two. If even the most aggressive attempt cannot reach your target, it says so rather than handing you a file that quietly misses it.
Output is always JPG. PNG is lossless, so its encoder ignores a quality argument entirely — hitting a byte target for a PNG means shrinking its dimensions and nothing else, which is the resizer’s job rather than this one’s.
Background reading: KB, MB and GB: what “must be under 100 KB” means.
FAQ
How do I compress an image to exactly 100KB?
Drop the image in, press the 100 KB button or type 100 in the box, and convert. The result will be the highest-quality version of that image that still fits under 100KB.
Why is my file slightly under the target rather than exactly on it?
A JPG encoder cannot be told to produce an exact byte count — only a quality level, which it turns into whatever size that produces. The tool finds the largest file that stays under your limit, so you get as much quality as the limit allows without ever crossing it.
What if the image cannot reach my target size?
It will tell you, and give you the smallest version it managed. Very small targets on very large photos are sometimes genuinely impossible without cropping. Try cropping to the part you actually need, then compressing again.
Does it work on HEIC photos from an iPhone?
Yes. HEIC files are decoded in your browser first, then compressed to JPG at your target size. There is no need to convert them separately beforehand.
Are my images uploaded to a server?
No. The encoding runs on your own machine through the Canvas API. The counter under the tool watches network activity during processing and stays at zero bytes uploaded.
Can I compress several images to the same limit at once?
Yes. Drop in as many as you like — each one is searched independently, so every file comes out under the limit rather than sharing a single quality setting that only suits one of them.