Compress an image to an exact file size
Type the limit you were given, add your photo, and get back the best-looking file that fits under it. The compression runs inside this page — your images are never uploaded to us.
Go straight to a target size
Why a form rejects your photo
A current phone camera produces files of three to six megabytes. Upload forms are typically built around limits of 20 KB to 500 KB, set years ago to keep storage and page load times under control. The gap between the two is why almost nobody can submit a photo straight from their camera roll.
Reducing a file to a specific number of kilobytes is not something photo apps do. They offer “small, medium, large” or a quality slider, and leave you guessing which one lands under the limit. This site does the opposite: you state the limit, and the tool searches for the highest quality that meets it.
How the target is hit
The image is decoded in your browser and re-encoded repeatedly at different quality levels, with the byte count measured each time. A binary search narrows in on the best value in about eight attempts. If the file still will not fit at the lowest usable quality, the pixel dimensions are reduced in steps and the search runs again — and the result line tells you when that happened, rather than quietly returning a smaller picture.
Nothing is sent anywhere. There is no upload endpoint on this site, no account, and no queue: the page is static files and the work happens on your own processor. That also means it keeps working on a slow connection, and that a private photo stays private.
Formats and tools
Getting the best result
- Crop before you compress. Background pixels cost bytes that your subject could have used.
- Work from the original file, not from something already compressed once — artefacts stack up.
- Resize first when a form specifies both dimensions and a file size, then compress the resized copy.
- Leave the output as JPG for anything going into a form. Many validators still reject WebP.