Exact KB · Free · No Signup

Compress Image to a Target Size

Upload forms almost never ask for "a smaller photo" — they demand under 20 KB, under 50 KB, under 100 KB. Set the number and this hits it, automatically finding the highest quality that still fits. Batch supported, and nothing leaves your device.

Drop images to compressor click to browse · JPG, PNG, WebP, HEIC-converted · batch supported
The result is guaranteed to come in at or under this, never over.
JPG is accepted everywhere. WebP reaches a given size at higher quality but some portals reject it.
Very small targets on a large photo cannot be reached by compression alone.
Exactlands at or under your limit
Batchmany files, one ZIP
100%private — runs in browser

Why a size limit is harder than a quality slider

A quality slider tells you nothing about the file size you will end up with. The same setting produces 40 KB from a flat graphic and 900 KB from a detailed photograph, because JPEG spends bits on detail, not on a number you picked. So hitting "under 50 KB" by hand means exporting, checking, adjusting and exporting again.

This tool does that loop for you. It binary-searches the quality scale, encoding at each step and keeping the best result that still fits, so you get the highest quality your limit allows rather than the first setting that happens to be small enough. Everything runs in your browser, so a batch of fifty photos costs nothing and queues behind nobody.

When compression alone cannot get there

Frequently Asked Questions

Will the result always be under the size I set?
Yes, that is the point. The tool only keeps an encode whose actual byte size is at or under your target. If it cannot reach the target at all — usually a very small limit on a very large photo with dimension shrinking turned off — it says so on that file rather than handing you something over the limit.
Why did my photo come back smaller in dimensions?
Because the target was not reachable by compression alone. Below a certain point the only way to lose bytes is to lose pixels. The result shows the dimensions it ended up at, and you can turn dimension shrinking off if you would rather it fail than resize.
Is 20 KB enough for a passport photo?
For most government and exam portals, yes — they are sized for a small headshot and typically ask for 20 KB to 50 KB. Check the exact limit on the form, since some also specify pixel dimensions and an aspect ratio that you should apply before compressing.
Does it upload my photo anywhere?
No. Decoding, re-encoding and the whole search loop run in your browser using Canvas APIs. Nothing is sent to a server, there is no queue and there is no daily limit.
JPG or WebP?
WebP reaches any given size at noticeably better quality, so choose it when you control where the file goes. Choose JPG for government forms, job portals and older systems, which frequently reject anything that is not JPEG or PNG.

Other Tools