Guide · 5 min read
How to resize an image to an exact file size
Upload limits are given in kilobytes, not pixels. Here is how to hit 200 KB, 100 KB or 50 KB exactly — and why the usual advice to “just resize it” misses.
Every government portal, job board and university application asks for the same thing: a photo under some number of kilobytes. Almost no image editor lets you ask for that. They let you pick a quality slider, save, check the file size, and go round again.
That loop is the whole problem, and it is a loop a computer should be running, not you.
Why picking a quality level does not work
JPEG quality is not a size dial. The same quality setting produces wildly different file sizes depending on what is in the picture. A portrait against a plain wall compresses to a fraction of what a photograph of a tree compresses to, because detail is what costs bytes. Quality 70 might land at 90 KB for one photo and 400 KB for the next.
So there is no quality number you can memorise. There is only searching for the one that happens to fit this particular image.
The search that actually finds it
Give the tool a target instead of a quality. It binary-searches JPEG quality between 0.05 and 0.95, re-encoding each time and measuring the real output, converging on the highest quality that still fits under your limit. Typically that is a dozen encodes, which takes a moment and costs you nothing.
If even the lowest quality is still too large, the picture is simply carrying more pixels than your limit can hold. At that point it scales the image down a step and searches again, so you get the largest image that fits rather than an error.
A target size is a question with an answer. A quality slider is a guess you have to verify yourself.
What to actually ask for
- Passport and visa photos: usually 100–200 KB, and the portal will say. Keep JPEG.
- Job applications and CV headshots: 200 KB is comfortable and looks fine.
- Website images: think in what the page needs, not what the camera gave you — under 150 KB for anything not full-width.
- Anything that must stay lossless (a logo, a diagram, a screenshot with text): use PNG and reduce the resolution instead, because PNG quality cannot be traded away.
The EXIF side effect worth knowing about
Re-encoding through a browser canvas rebuilds the image from its pixels. Everything that was wrapped around those pixels — GPS coordinates, camera model, the timestamp, sometimes the owner's name — does not survive the trip.
That is usually what you want. A photo taken on a phone carries the location it was taken in, and people post those to public profiles without ever knowing. If you did want the metadata kept, copy it separately before you compress.
Do it without handing over the photo
An ID scan, a passport photo, a picture of a signed document — these are exactly the files that should not be posted to a conversion site in exchange for a smaller version of themselves. Ours decodes and re-encodes on a canvas inside your own browser. There is no upload step, because there is no server involved in the work.
KaiOrb is a network of companies building software for other businesses. The tools are free and always will be.