Upload forms are unforgiving. An exam portal wants your photo “between 20 and 50 KB”, a visa site caps files at 240 KB, a job board rejects anything over 1 MB. Hitting those numbers by hand — exporting, checking the size, re-exporting — is tedious. Here is how exact-size compression works and how to do it in seconds.
What “compress to an exact KB” means
Image compression reduces a file’s byte size while keeping acceptable visual quality. “Compressing to an exact KB” adds a constraint: the output must land at or below a specific size, such as 50 KB, so it passes an upload check.
You cannot reliably hit a size to the exact byte — each browser ships a different JPEG encoder, so the same quality setting produces slightly different sizes. What a good tool can guarantee is that the result never exceeds your target.
How the compression engine finds the right size
A precise compressor doesn’t guess. It runs two nested loops:
- Binary search on quality. For JPG and WebP, quality is a dial from 0 to 1. The tool encodes at a mid quality, checks the size, and moves up or down — converging on the highest quality that still fits your target in about eight steps.
- A downscale ladder. If even the lowest quality is still too big (common when you ask for 20 KB from a 12-megapixel photo), the tool reduces the dimensions and tries again.
The result is the largest, sharpest image that fits your target.
Step by step
- Open the Image Compressor to Exact KB.
- Drag in your image (JPG, PNG, WebP or HEIC).
- Type your target — for example
50withKBselected. - Optionally set exact dimensions or a format if a form requires them.
- Download. The tool shows the final size so you can confirm it fits.
Roughly what fits in each size
| Target | Typically good for |
|---|---|
| 20 KB | Small profile photo, exam thumbnail, signature scan |
| 50 KB | Passport-style photo, compact web image |
| 100 KB | Clear ID photo, medium web image |
| 200–500 KB | High-quality web photo or detailed scan |
| 1 MB+ | Full-resolution photo with plenty of detail |
As a real example, a 4 MB iPhone photo typically compresses to around 180 KB at quality 0.7 with no visible loss — a 95% reduction.
A note on format
If a form demands a specific format, set it. Otherwise: choose JPG for photos, WebP for the smallest files at the same quality, and PNG only for graphics with sharp edges or transparency (and expect larger files).