Compress an image to an exact file size
Pick a target size, drop in a photo, and get a file that is guaranteed to fit the limit you were given. Everything runs on your device, so the image never leaves your browser.
Compress to a target size
Works with JPG, PNG, WebP, BMP and GIF (first frame).
Why a target size beats a quality slider
A quality slider asks you to guess, check the file size, then guess again. Forms and portals care about one number — the maximum size — so this tool works backwards from that number and stops at the highest quality that still fits.
What happens to the file
Your browser decodes the image, re-encodes it at decreasing quality until it fits, and hands you a download. Transparent PNGs are flattened onto white by default because most upload forms reject transparency.
When it cannot reach the target
A very detailed photo cannot fit 20 KB without turning into mud. In that case the tool tells you plainly instead of silently handing over a file that still fails the upload check.
Every page in this tool
Each one is pre-filled with the numbers it is named after, so you land on the answer instead of a blank form.
Frequently asked questions
Is my image uploaded to a server?
No. The compression runs in your browser tab using the Canvas API. You can even disconnect from the internet after the page loads and it will still work.
Which formats can I compress?
JPG, PNG, WebP, BMP and GIF (first frame only). HEIC photos from iPhones need converting to JPG first — the tool tells you how.
Does compressing to 100 KB ruin the quality?
For a 2 MB phone photo, an 8-pass quality search usually lands around 70–85% quality at 100 KB, which is visually clean on screen. Small targets (20–50 KB) need real trade-offs.
What is the largest file I can use?
20 MB per file. Files above that are rejected with a message rather than freezing the tab.
Quality is found by binary search (8 passes), then the image is proportionally downscaled only if quality alone cannot reach the target. No server, no re-upload, no quality slider guessing.