Compress Image to 20KB
Tell us the size you need and we handle the rest. The compressor searches for the highest quality that still fits under 20KB, reducing dimensions only if quality alone cannot get there.
Tell us the size you need. We handle the rest.
Drop your image here
or
Choose ImageYou can also paste an image with Ctrl+V
Images are processed on your device and never uploaded.
• •
Runs on your device — nothing is uploaded.
Working…
0%
- Original
- Result
- Saved
- Quality
How to compress an image to 20KB
- Select your photo — JPG, PNG, WebP, HEIC and AVIF all work.
- The target is already set to 20KB. Change it if you need a different ceiling.
- Press Compress.
- Check the result — it will be at or just below 20KB — and download.
When you need a 20KB image
20 KB is a genuinely tight budget, and it almost always comes from a form that refuses anything larger:
- Government and exam portals — application systems in India, Pakistan, Egypt and elsewhere routinely cap photo uploads at 20 KB, sometimes with a minimum of 10 KB as well.
- Signature fields — scanned signatures are usually limited to 10–20 KB and are the easiest case, since line art compresses extremely well.
- Forum avatars and small profile pictures displayed at 100 px.
- Email signatures, where every recipient downloads the image.
At this size a full-resolution photo is impossible, and that is fine: the target is nearly always displayed as a small thumbnail anyway.
How the 20KB compressor works
Hitting a byte target precisely is a search problem, not a formula. Here is what runs when you press the button:
- Analyse. The image is decoded and measured — dimensions, format, whether it has transparency, and its true byte size.
- Estimate. A first quality guess is derived from the ratio of 20KB to the original size. This is only a starting point, never the answer.
- Binary search on quality. The image is re-encoded and measured, then the quality range is halved toward the target. Eight to twelve encodes are usually enough to land within a few percent.
- Reduce dimensions, but only if needed. If even the lowest
acceptable quality overshoots, the scale factor
√(target / current)is applied with a small safety margin and the quality search restarts at the new size. - Refine upward. If the first success lands well under 20KB, the search tries a larger scale to spend the remaining budget on pixels rather than leaving it unused.
The result is the largest, sharpest image that still fits — not the first one that happens to be small enough. Landing at 20KB minus a hair is the goal; landing at a third of 20KB is a failure, even though it technically fits.
Getting the best quality at this size
Reaching 20 KB from a 5 MB phone photo means removing 99.6% of the data, so resolution reduction is unavoidable. To get the best result:
- Crop before you compress. A tight crop on a face wastes no bytes on background. This is by far the highest-leverage step at 20 KB.
- Expect roughly 400×500 pixels for a portrait. That is more than enough for a form thumbnail.
- Keep JPG as the output. WebP is smaller in theory, but many older government portals reject anything that is not JPEG.
- Avoid busy backgrounds. Noise is expensive; a plain wall behind the subject buys you noticeably more quality.
Will the quality drop?
Some quality is always lost when a large photo is squeezed into 20KB — the question is whether you will notice. The result panel shows an honest verdict:
- Excellent — indistinguishable from the original at normal size.
- Very Good — differences visible only when pixel-peeping.
- Good — fine for web and messaging use.
- Reduced — visible softening; acceptable for thumbnails and forms.
- Low — the target is aggressive for this image; consider raising it.
If you would rather keep every original pixel and accept whatever size results, tick Keep original dimensions in Advanced Settings — the tool will then solve with quality alone, and tell you if it cannot reach the target.
Supported formats
Input: JPG, PNG, WebP, GIF, BMP, HEIC/HEIF and AVIF. Output: JPG (default and smallest for photographs), WebP (smaller still, keeps transparency), or PNG (only sensible for flat graphics).
HEIC and AVIF decoders are downloaded on demand, so pages stay light for everyone who does not need them.
Frequently asked questions
Are my images uploaded to your server?
No. The image is decoded, processed and re-encoded by your own browser using the Canvas and Web Worker APIs. There is no upload endpoint for this tool — open your browser's network panel while you use it and you will see no request carrying image data.
What if my image is already under 20KB?
The tool tells you so and offers the original file unchanged — there is no reason to re-compress something that already fits. You can still force a pass if you want it closer to 20KB.
My form needs between 10KB and 20KB — can I hit that window?
Yes. The search deliberately aims just under the ceiling rather than far below it, so a 20 KB target typically lands between 19 and 20 KB — inside a 10–20 KB window. If you need an even tighter floor, use the custom target and set it to 20 KB exactly.
Can I get a passport photo down to 20KB?
Yes, and it will still be legible at print thumbnail size. Crop to the required aspect ratio first with the 2×2 or 3×4 photo tool, then compress — cropping first always produces a better 20 KB result.
Why is the result slightly under the target instead of exactly on it?
Encoders do not accept a byte count — they accept a quality setting, and the resulting size is whatever it is. The search aims for the 97–100% band below your target and never goes over, because a file one byte too large fails the upload it was made for.
What happens to my file when I close the tab?
It is gone. The image only ever exists in your browser's memory as an object URL; closing or refreshing the page discards it. Nothing is written to our servers, and nothing is stored on your device unless you download the result.