Kit-Bin
Donate

Target size

Current target: 500 KB

Drop a JPG, PNG, or WebP here or click to browse

Processed entirely in your browser. Never uploaded to a server.

This tool compresses a JPG, PNG, or WebP until it fits a file size you choose. Pick a target above, drop the image, and it works out the encoder settings for you instead of asking you to guess at a quality slider.

Use it when something has rejected your file for being too big: a job application portal capped at 500 KB, a forum avatar capped at 100 KB, a visa or passport photo upload, or an email attachment limit.

How it decides

First it checks whether the file already fits. If it does, you get your original bytes back with no re-encoding at all. Otherwise it binary-searches encoder quality between 10 and 95, up to 8 passes, and keeps the highest quality that still lands under the target. Only if quality 10 is still too large does it start reducing the pixel dimensions, in steps, running the quality search again at each smaller size. That order matters: dropping resolution is the more visible change, so it is the last resort, not the first move.

Formats and transparency

A JPG stays a JPG. A PNG or WebP is encoded as WebP, because PNG has no quality setting to search against. If the image contains transparent pixels, the output is WebP, which keeps the alpha channel. Transparency is never dropped by converting to JPG behind your back. The results panel always names the output format so there is no guessing.

When the target cannot be met

Some combinations are not achievable, for example a 50-megapixel photo squeezed into 20 KB at full resolution. In that case you still get a file: the smallest one the tool produced, clearly marked as over target. Raising the target or accepting a smaller pixel size is usually the fix.

Want a plain quality-based squeeze with no size target? Use Compress Image. To set exact pixel dimensions instead, use Resize Image.

Not sure whether you need a smaller file or a smaller image? Read: Compression vs Resizing.

FAQ

How does it hit an exact size limit?
It binary-searches the encoder quality, up to 8 encode passes between quality 10 and 95, and keeps the highest quality whose output still fits under your target. If even quality 10 is too large, it then reduces the pixel dimensions in steps and searches quality again at each size.
What if my target is impossible?
It gives you the smallest file it managed to produce and says the target was not reached, rather than failing silently or returning something over the limit. Very small targets on very large images are the usual cause.
Will my PNG stay a PNG?
No. PNG has no quality dial to search, so a PNG input is encoded as WebP, which does have one and also supports transparency. A JPG input stays a JPG. The output format is shown in the results panel.
Does transparency survive?
Yes. If the image has any transparent or semi-transparent pixels, the output is WebP, which keeps the alpha channel. This tool never converts a transparent image to JPG.
What does "1 MB" mean here?
1 MB means 1,048,576 bytes and 1 KB means 1,024 bytes. If the system you are uploading to counts megabytes as 1,000,000 bytes, a file that fits this tool's 1 MB target also fits that limit.

Targeting a specific size for an email attachment? Read why the real limit isn't what it looks like.