Compress Image to Target KB
Compress JPG, PNG and WebP images to a target file size online. Adjust the target size and download the optimized image.
Drag images here, or choose files
JPG, PNG or WebP · up to 20 images · max 25 MB each
Target size
Auto keeps transparency by using WebP, and never flattens it to JPG without you choosing JPG.
Runs entirely in your browser. Your file never leaves your device — nothing is uploaded to us.
Compress to a Size Limit, Not a Quality Guess
Upload a JPG, PNG or WebP, name the file size you need, and the tool searches for the highest quality that actually fits underneath it. Every result is measured from the encoded file itself, so a size shown here is the size you download.
Compression runs on your device using the browser's own image encoder. Nothing is uploaded, which makes this safe for product photos, ID documents, scanned forms and anything else you would rather not hand to a website.
Why a Target Size Instead of a Quality Slider
Most upload forms do not ask for a quality setting — they impose a limit. A government portal wants a photo under 100 KB, a marketplace caps images at 200 KB, a job application refuses anything over 500 KB. Guessing at a quality percentage and re-checking the result is the slow way to satisfy that.
This tool works backwards from the limit. It encodes the image repeatedly, narrowing in on the highest quality whose output still fits, and stops as soon as more effort would not help. If you want the opposite — hands-on control of quality and dimensions — the image compressor is the better fit.
How the Search Works
The tool binary-searches encoder quality between roughly 35% and 95%, keeping the largest file that still fits your limit, because among files that fit, the largest is the one that looks best. It measures the real encoded output every time rather than estimating from a formula.
Dimensions are preserved by default. Only when quality alone cannot reach the target does the tool reduce the image size, and it never enlarges an image. When it does resize, the result shows the new dimensions so nothing happens silently.
Transparency and Format Choice
PNG is lossless, so it has no quality dial to trade away — the only way to shrink a PNG is to reduce its dimensions. Because of that, an opaque PNG is converted to JPG by default, which is where the real savings are for photographs.
An image with genuine transparency is never flattened onto JPG automatically. It is converted to WebP instead, which is lossy enough to hit a target while still carrying an alpha channel. If you deliberately choose JPG for a transparent image, the transparency is filled with white and the result says so.
When the Target Cannot Be Reached
Some limits are not achievable. A detailed 12-megapixel photograph will not become a recognisable 20 KB file, and a lossless PNG has a floor no quality setting can move.
When that happens the tool hands back the best result it managed and says plainly that the target was missed, along with what stopped it. It will not quietly return a file that is over your limit while implying it succeeded.
Frequently Asked Questions
How do I compress an image to 100KB?+
Upload your image, choose the 100 KB preset, and press Compress. The tool searches for the best quality that produces a file under 100 KB and shows the exact result size. If 100 KB is not achievable for that image, it says so rather than returning an oversized file.
Is the file really under the size I chose?+
Yes. The size shown is measured from the encoded file you are about to download, not estimated. A result is only marked as reaching the target when the actual bytes fit within it.
Are my images uploaded to a server?+
No. Decoding, compression and download all happen in your browser. The images never leave your device, and closing the tab discards them.
Will compressing change my image dimensions?+
Not unless it has to. Dimensions are preserved while quality alone can reach your target. If it cannot, the tool reduces the dimensions as a last resort and shows you the new size. You can switch that off, in which case an unreachable target is reported instead.
What happens to a transparent PNG?+
It is converted to WebP, which keeps the transparency while still being compressible to a target size. It is never converted to JPG automatically, because JPG cannot store an alpha channel. Choosing JPG yourself will flatten transparency onto white and the result tells you it did.
How many images can I compress at once?+
Up to 20 per batch, processed one at a time so a large queue cannot exhaust your browser's memory. Each image has its own progress and result, one failure does not stop the rest, and you can download them individually or together as a ZIP.
Which formats are supported?+
JPG, PNG and WebP — the formats every browser can decode and encode natively. HEIC and HEIF are not supported, because decoding them in a browser requires shipping a large licensed decoder.
Related Free Tools
These tools work great with your workflow too.
Image Compressor
Hands-on quality and resize control when you want to steer compression yourself.
Try it freeImage Resizer
Resize to exact dimensions for marketplace and social image requirements.
Try it freeImage Converter
Convert between JPG, PNG and WebP without changing the file size target.
Try it free