FormFix

How to Compress an Image to 20KB

Step-by-step guide to reduce image file size to under 20KB for online forms and applications.

Many government portals, scholarship applications, and exam registration sites require you to upload a photo or document under 20 KB. That is a tight budget — a single phone photo can easily be 5 MB, more than 250 times the limit. The good news is that 20 KB is achievable for small images like passport photos, signatures, and ID scans, as long as you compress correctly. This guide walks through it using FormFix’s free client-side compressor.

Step 1 — Know what 20 KB looks like

20 KB is roughly enough space for a 300×400 pixel JPEG at quality 70, or a 600×600 pixel JPEG at quality 35. For a passport photo (typically 35×45 mm at 600×600 px), that is fine. For a full-page scan, you will need to drop resolution aggressively. Before compressing, decide what minimum dimensions are acceptable for the destination. Most forms state this in their guidelines (e.g. “200×230 pixels, max 20 KB”).

Step 2 — Open the Compress to 20KB tool

Go to Compress Image to 20KB. The tool runs entirely in your browser — your file never leaves your device. Drag and drop your image into the upload zone, or click to browse. JPG, PNG, and WebP files up to 20 MB are accepted.

Step 3 — Let the binary search do its work

When you click Compress, the tool runs a binary search over JPEG quality values, starting at 0.92 and narrowing down. Each iteration encodes the image at a candidate quality, measures the resulting byte size, and adjusts. Typically the search converges in 10–12 iterations, which takes under a second even on a phone. The result is the highest quality that fits the 20 KB budget.

Step 4 — If the file is still too big, downscale

If even quality 0.15 cannot bring the image under 20 KB, the compressor automatically halves the longest edge of the image and retries. This loop repeats until the target is met or the image becomes impractically small (below ~150 pixels). For most passport photos and signatures this never triggers; for large photos it usually converges after one or two scaling steps.

Step 5 — Preview and verify

The result card shows the compressed file size and a preview image. Check the preview carefully — if faces look blocky or text is unreadable, the resolution may be too low. In that case, start from a higher-resolution source if you have one, or accept the trade-off. The tool also shows the percentage savings (e.g. “97% smaller”).

Step 6 — Download

Click Download to save the compressed file. The download is generated locally from a Blob, so there is no server round-trip — it is instant. The original file is never uploaded or stored.

Tips for hitting 20 KB cleanly

  • Start from the largest, cleanest source you have. Re-compressing an already-compressed JPEG compounds artifacts.
  • Pre-crop the image. A passport photo should not contain a full-body shot — crop to head and shoulders before compressing.
  • Use JPEG, not PNG. PNG’s lossless compression cannot compete with JPEG for photographs; the same photo at the same dimensions is often 5–10× larger as PNG.
  • Check accepted formats. Some portals accept only JPEG; if you are unsure, default to JPEG.
  • Verify the result meets both constraints. Some sites check dimensions as well as file size — confirm both before submitting.

If 20 KB is too aggressive for your image (e.g. a multi-page scan), consider splitting the task or asking whether the portal accepts a higher limit. Otherwise, the Compress Image to 50KB tool is a less aggressive alternative.

Ready to put this into practice?

Try this tool →

More guides