Drop your image here
One image to edit step by step · or several to batch optimise
Reads JPG · PNG · WebP · AVIF · HEIC · GIF · BMP · TIFF · SVG — writes JPEG · PNG · WebP · AVIF · JXL
Type the size you need — 100 KB, 500 KB, 2 MB — and the tool searches for the highest quality that still fits under it, then tells you which quality it used.
You name the size, it finds the quality
Upload limits are stated in kilobytes, not quality percentages, so this works the way the problem is actually posed. Give it a number and it encodes your image repeatedly, halving the search range each time, and keeps the highest quality that still comes in under your target. Seven encodes cover the whole 1–100 range, and it reports the quality it settled on so you can see what the limit cost you.
A real search, not an estimate
It encodes and measures rather than guessing from pixel counts, so the number you get is the number the file actually weighs. The result is the largest quality that fits — never the first one that happens to.
AVIF gets you furthest
At a fixed budget the format decides how much quality survives. AVIF typically fits 50–70% more detail into the same kilobytes than JPEG, so a tight target that looks bad as JPEG is often fine as AVIF.
Honest when it cannot
If even quality 1 stays over your target, the image is simply too large in pixel terms. It says so and points you at resizing, instead of handing back something that misses the limit.
Other image tools
Questions about this tool
How do I compress an image to exactly 100KB?
Type 100 in the target field, or use the 100 KB preset, and press the button. The tool encodes your image at several quality levels, narrowing in on the highest one that still fits under 100 KB, and reports both the final size and the quality it used. You will usually land just under the target rather than exactly on it, because quality is a discrete dial.
Can I compress an image to 20KB or 50KB?
Yes, and the presets include 50 KB. Very small targets are easier to hit at smaller dimensions, so if quality 1 still overshoots, resize the image down first and run the search again. AVIF will also reach a low target with much more detail intact than JPEG.
Why can't it reach my target size?
Because there is a floor: even at the lowest quality, a given number of pixels needs a certain number of bytes. When that floor is above your target the tool says so explicitly. Resizing the image smaller lowers the floor, and switching to AVIF lowers it further.
Which format gives the smallest file?
AVIF, by a wide margin at the same visual quality — typically half of JPEG. WebP sits between the two. PNG is lossless and has no quality dial, so it cannot be targeted at a size at all; picking it switches the search off.
Does it resize my image to hit the target?
No. It only changes the encoding quality, so your dimensions are untouched. Resizing is a separate, deliberate step — which is the right order, since you should decide how big the image needs to be before deciding how hard to compress it.