Compress an Image to Under 20 KB
A 20 KB ceiling, reached by searching quality rather than guessing it.
Who asks for a 20 KB limit
Signature and photograph uploads on several national examination and recruitment portals, plus small avatar images.
What 20 KB buys you in pixels
A workable ceiling for a 20 KB photograph is around 420 pixels on the long edge at a quality that still looks like a photograph rather than a mosaic. That figure is empirical: it comes from how much high-frequency detail survives compression at that byte budget, and it moves up for images with large flat areas and down for images full of foliage, fabric or hair.
| Long edge | What to expect at 20 KB |
|---|---|
| Under 252 px | Comfortable — the quality search will settle in the high end of the range |
| 252–420 px | Workable — expect mid-range quality, check gradients for banding |
| Over 630 px | Resize down first, or the target cannot be met without visible damage |
20 KB is the cap that catches people out most often, because a phone photo starts near 4 MB. Resize to roughly 420 pixels on the long edge before you compress and the quality search will succeed on the first or second step.
The limit that catches phone photographs
A modern phone photo starts near 4 MB, which is about two hundred times this ceiling — so no amount of quality reduction alone will reach it. Resize to roughly 420 pixels on the long edge first and the arithmetic changes completely: you are then asking for about 50,000 pixels at around 3 bits each, which is an ordinary working range for JPEG rather than an extreme one.
Why this runs in your browser
The file is read from your disk by the browser, decoded with the browser's own codecs, and re-encoded in this tab. No upload request is made, nothing is queued on a server, and closing the tab leaves no copy anywhere. You can verify this in the network panel while it works.
How to use it
- Drop the image on the drop zone.
- Set the target size to 20 KB.
- Let the quality search run — it reports the quality level it settled on.
- Check the resulting file is at or under 20 KB, then download.
Worth knowing
- Target 20 KB permits roughly 420 pixels on the long edge at photographic quality.
- The quality search encodes repeatedly and keeps the highest quality that fits.
- Image content, not just dimensions, determines how far the quality can be pushed.
- Switching to WebP at the same 20 KB budget usually looks visibly better than JPEG.
Limitations
- Very tight targets require resizing as well as compressing — compression alone has a floor.
- Downscaling permanently discards pixels; keep the original as your archive copy.
- Re-compressing an already-compressed file spends quality twice.
- Some portals also check pixel dimensions and file format, not just the byte count.