Compress image to an exact size
Name the size you need. It works backwards to get there, and shows you the arithmetic.
Runs in your browser0 bytes uploadedName the size you need. It works backwards to get there, and shows you the arithmetic.
Runs in your browser0 bytes uploadedDrop an image here
or paste Ctrl+V
Nothing is uploaded. The image is compressed in this tab.
Every other image compressor asks you to pick a quality level and then tells you what size you got. That is the easy direction, and it is the wrong one. Nobody wants "quality 70". They want the file under the 2 MB limit the form is enforcing.
Getting there requires a search: encode at some quality, measure the result, adjust, encode again. Doing that by hand is the three-attempts-and-give-up experience everyone recognises. This tool does the search itself — and shows you every attempt it made, so the number you end up with is not a black box.
It is a binary search over the quality scale. Start in the middle, encode, and see which side of the target you landed on. Too big means the answer is in the lower half; small enough means try higher and keep the largest result that still fits. Each round halves the remaining range, so it converges in a handful of attempts rather than dozens.
Before searching a given size, the tool encodes once at the lowest quality it is willing to use. If even that is over your target, no amount of searching at that resolution will help — so it moves straight to scaling instead of wasting five encodes proving a point.
When quality alone cannot reach the target, the image is scaled down and the search runs again at the smaller size. The order is deliberate: at normal viewing sizes, compression artefacts are less noticeable than a loss of resolution. Reducing dimensions is the bigger visible sacrifice, so it is the second lever, not the first.
When scaling happens, the tool says so and tells you the new dimensions. A photo that silently came back at half resolution is a worse outcome than one that came back slightly larger than you asked.
Some targets cannot be met with a usable image. A twelve-megapixel photograph will not become a good-looking 20 KB file, and a tool that keeps compressing until it hits the number produces something nobody wants.
At that point the honest answer is to stop and say so. The right advice is to crop the image, accept a larger file, or ask whether the limit is really that strict — not to hand back a smear of blocks that technically meets the specification.
The presets are not round numbers chosen for tidiness. They are the limits that turn up in practice: upload forms that cap at 200 KB or 500 KB, email attachments around the 25 MB mark, and job application portals that are stricter than anything else on the internet.
Compression happens in your browser, using the JPEG encoder already built into it. That matters for photos more than for most files, because a photo carries EXIF metadata — including, by default, the GPS coordinates of where it was taken. Uploading a photo to compress it means uploading that location too.
Because encoding is the easy direction: pick a quality, see what size you get. Going the other way needs a search — encode, measure, adjust, repeat. That is what this tool does, and it shows you each attempt rather than hiding them.
It tells you, rather than producing something unusable. Past a certain point the right advice is to crop the image or accept a larger file, not to keep degrading it — so the tool says so instead of quietly returning mush.
No. The compression happens in your browser using the same encoder your browser uses everywhere else. The file never leaves this tab.