PixelResize
Compress5 min readUpdated July 25, 2026

How to Compress an Image to Exactly 20KB

Written by The PixelResize Team

A 20KB limit almost always comes from a government form, exam application, or an older upload system that wasn't built for modern phone photos. Trying to hit that number by dragging a quality slider and re-exporting repeatedly wastes time and usually leaves the image looking worse than it needs to, especially right before a submission deadline.

What makes 20KB particularly unforgiving is that it leaves very little margin for error — unlike a 500KB or 1MB limit, there's no comfortable buffer to fall back on if the first attempt doesn't quite fit, which is exactly why a deliberate process matters more here than at looser limits.

Here's the fastest reliable way to get there, what quality to realistically expect, and what to do if the first attempt still looks rougher than you'd like.

Compress Image to 20KB

Compress a photo or signature to 20KB online for free. Built for tight exam and form upload limits — runs in your browser, no upload, no watermark.

Open the tool

What to expect at 20KB

At this size, a small photo — like a passport-style headshot around 200 to 300 pixels wide — can still look reasonably clear. A large, detailed photo forced down to 20KB will show visible blockiness, since there simply isn't enough data left for fine detail.

This is why most 20KB requirements are paired with a small required pixel size — the limit is designed around small ID-style photos, not full-resolution images, and trying to apply it to a large photo will always give a worse result than applying it to a correctly sized one.

The fastest way to hit the target

Resize the image to the pixel dimensions the form actually requires first — this alone does most of the work, since fewer pixels means less data to compress. Then use a target-size compression mode that automatically finds the JPG quality level landing at or just under 20KB, rather than guessing a quality percentage manually.

If the form doesn't specify exact pixel dimensions, a reasonable starting point for a passport-style photo is around 200 x 230 to 300 x 300 pixels, which gives the compressor enough room to preserve detail while still comfortably reaching 20KB.

Why resizing matters more than the quality setting here

At looser file size limits, the quality setting does most of the heavy lifting. At 20KB, it's actually the pixel dimensions that matter most — an oversized photo compressed aggressively enough to hit 20KB will almost always look worse than a correctly sized photo compressed at a higher quality setting.

This is the single most common mistake people make with tight limits like this one: adjusting quality endlessly instead of simply resizing the canvas down first.

If the result still looks too compressed

  • Double-check the required pixel dimensions — a photo that's too large for 20KB will always look worse than one sized appropriately first.
  • Convert to grayscale first if the form doesn't require colour, since grayscale images compress considerably smaller at the same visual quality.
  • Avoid saving as PNG for a photo — PNG's lossless compression can't reach 20KB for anything but the simplest images.
  • Simplify the background if possible, since a busy or textured background adds detail the compressor has to work harder to preserve.

Key takeaways

  • 20KB limits are almost always paired with a small required pixel size for ID-style photos.
  • Resize to the correct pixel dimensions before compressing — it does most of the work.
  • At this tight a limit, pixel size matters more than the quality percentage setting.
  • A target-size compression mode is far faster than manually guessing a quality percentage.
  • Grayscale can help when a form doesn't require colour and you're struggling to hit the limit.
  • JPG, not PNG, is the right format for compressing a photo down to this size.

Frequently asked questions

Related tools