Compress an Image to a Target Size

Compress a JPG or PNG to an exact size in KB — 20KB, 50KB, 100KB or any limit a form demands. Hits the target in your browser, nothing uploaded.

Runs in your browserNothing uploadedFree · no signup
Drop an image here, or click to chooseJPG, PNG or WebP. The result is saved as JPG or WebP.

Frequently asked questions

How does it hit an exact KB target?
It searches for the highest JPG or WebP quality whose encoded file still fits your limit, re-encoding the image a few times and keeping the best result. If even the lowest quality is too big — common when a 12-megapixel phone photo has to fit in 20 KB — it also reduces the pixel dimensions and searches again, so the target is met without you guessing at a quality slider.
Is 1 KB counted as 1024 bytes?
Yes. A 50 KB target means 51,200 bytes, which is how Windows and most upload forms count. The exact byte figure is shown next to the result. A few strict portals treat 50 KB as 50,000 bytes instead, so if one rejects a file that looks like it fits, set the target a little lower and compress again.
Why can't I choose PNG as the output?
PNG is lossless, so there is no quality dial to turn — the only way to shrink a PNG is to throw away pixels or colours. JPG and WebP both have a real quality setting, which is what makes hitting a byte target possible. A PNG you upload is converted, with transparent areas flattened onto white for JPG; WebP keeps transparency and is usually 25-35% smaller than JPG at the same quality.
Is my photo uploaded anywhere?
No. The image is read from your own device and every re-encode happens in the page using your browser's canvas. Nothing is sent to a server, which matters for the ID photos and signed documents these size limits are usually attached to.