How to compress an image to an exact size
Add your image
Drag and drop or browse. It loads straight into your browser — never uploaded to a server.
Set the target
Type the exact size you need, or tap a preset like 50 KB. This is the limit your form requires.
Download
Hit Compress, then Download. The file lands at or just under your target, ready to upload.
Why people need an exact KB size
Most online forms reject an image if it is even slightly too large. Government portals, examination boards, and visa or passport applications almost always set a hard maximum — often something like "photo must be under 50 KB" or "signature between 10 and 20 KB." A normal phone photo is several megabytes, far over those limits, so it gets rejected again and again until you shrink it to fit.
This tool exists to make that one frustrating step painless. Instead of guessing and re-saving, you type the exact number the form asks for and get a file that fits the first time.
Common upload limits this tool handles
- Photographs for exam & job forms — frequently capped at 20 KB to 100 KB.
- Signatures — usually a small range such as 10 KB to 20 KB.
- Passport & visa photos — often a few hundred KB with strict dimensions.
- Document scans — many portals ask for under 200 KB or under 500 KB.
How the compression actually works
When you choose a target size, the tool re-encodes your image as a JPEG and intelligently searches for the right quality setting to land at or just below your target. It does this by repeatedly testing quality levels — a method called binary search — narrowing in until the output is as close to your target as possible without going over. For very small targets, it will also reduce the image's dimensions so the picture still looks as clear as it can at that size.
Everything happens locally using your browser's built-in image engine (the HTML Canvas). Because nothing is sent to a server, the process is instant and completely private — your photo, ID, or signature never leaves your device.
Tips for the best result
- If the form also specifies dimensions (like 200×230 pixels for a passport photo), resize to those first, then compress to the KB limit.
- For signatures, a white background and high contrast compress much smaller than a busy photo.
- If your target is extremely small and the image looks blocky, try a slightly higher limit if the form allows a range.