Runs in your browser. Your files and text never leave your device - nothing is uploaded.
How do I compress an image to under 20KB?
To get an image under 20KB, first cut its pixel dimensions: around 450 pixels on the long side suits a portrait photo, and a signature cropped tight to the ink needs even less. Then run a target-size compressor at 20KB, which lowers JPEG quality until the file fits. Full-size phone photos rarely fit without resizing.
20KB at a glance
- Exact limit: 20KB is 20,480 bytes, since the compressor counts 1KB as 1,024 bytes.
- Strict limit of 20,000 bytes: set the target to 19 instead.
- Balanced-quality pixel budget (about 1 bit per pixel): 0.16 megapixels, roughly 460 × 340.
- A small portrait photo (350 × 450) gets 1.0 bits per pixel. It fits at balanced quality.
- A 12-megapixel phone photo at full size gets 0.014 bits per pixel. That is too tight for a clean result, so resize first.
Where a 20KB limit usually comes from
A 20KB ceiling is most often attached to the small image slots on online application and registration forms: a passport-style photo, a scanned signature, sometimes a thumb impression. Recruitment, exam and admission portals in particular tend to set limits in the tens of kilobytes, and many state the pixel size they expect next to the file size. When a form gives both, match the pixels first and the file size usually follows.
Outside forms, 20KB is a sensible budget for anything that is only ever shown small: avatars, list thumbnails and the headshot in an email signature, which display at 100 to 200 pixels wide and never reveal more detail than that.
How many pixels fit in 20KB?
At 20KB the arithmetic is unforgiving. Even with heavy compression the budget runs out at about a 570-pixel square, and at balanced quality it is closer to 400 pixels a side. That is still plenty for an ID-style portrait, which forms usually want at a few hundred pixels per side, but nowhere near a camera original.
| Compression level | Bits per pixel | Pixel budget | Square | 4:3 frame |
|---|---|---|---|---|
| Heavy compressionartifacts visible up close | ~0.5 | 0.33 MP | 570 × 570 | 660 × 490 |
| Balancedclean at normal viewing size | ~1 | 0.16 MP | 400 × 400 | 460 × 340 |
| High qualityhard to tell from the original | ~2 | 0.08 MP | 280 × 280 | 330 × 240 |
Each row divides the 163,840 bits in 20KB by the bits per pixel, then fits that many pixels into a square and a 4:3 frame, rounded down to the nearest 10 pixels. Turn the 4:3 figure on its side for a portrait photo.
These figures are rules of thumb for JPG photos, not guarantees. Smooth skin, sky and plain walls need far fewer bits than foliage, fabric, small text or low-light grain, so the same pixel count can land well under or over the target. WebP, which PNG, WebP and GIF uploads are saved as, usually needs fewer bits than JPG for a similar look.
Getting a photo or signature under 20KB
For a portrait, crop to head and shoulders first, then resize so the long side is roughly 450 pixels or less. A plain, evenly lit background helps more than people expect: flat colour costs almost nothing to store, while a patterned wall or grainy low-light shadows eat the budget.
For a signature, sign in dark ink on plain white paper, photograph or scan it, and crop right up to the ink. A tight crop a few hundred pixels wide is mostly white and compresses easily as a JPG. If the signature is a PNG, for example one exported with a transparent background, the compressor saves it as WebP; when the form only accepts JPG, run it through PNG to JPG first, which places it on white, and compress the JPG instead.
If the result still reads above 20KB, the image has too many pixels for the target and no quality setting will rescue it. Make it smaller with the image resizer and compress again: halving the width and height cuts the pixel count to a quarter.
20KB compared with nearby sizes
| Target | Pixels at ~1 bit per pixel | Approx. 4:3 size | Compared with 20KB |
|---|---|---|---|
| 20KB | 0.16 MP | 460 × 340 | Current target |
| 30KB | 0.25 MP | 570 × 420 | 1.5× the pixels, about 22% wider and taller |
| 50KB | 0.41 MP | 730 × 540 | 2.5× the pixels, about 58% wider and taller |
Stepping up from 20KB to 30KB gives 1.5 times the pixel budget. If a form allows the larger size, use it; the extra room shows up as cleaner edges around hair and handwriting rather than as a bigger picture.
Frequently asked questions
There is no single correct size, but a portrait of about 350 × 450 pixels gets roughly 1.0 bits per pixel at 20KB, which usually looks clean. If the form specifies dimensions, use those; passport-style slots on forms often ask for a few hundred pixels per side, which fits 20KB comfortably.
Rarely in a usable form. A 12-megapixel photo would get only about 0.014 bits per pixel at 20KB, far below what JPEG needs to hold a recognisable picture. Lowering quality cannot close that gap, so resize to a few hundred pixels per side first.
PNG, WebP and GIF uploads are saved as WebP, because WebP keeps transparency and can be compressed by lowering quality, which PNG cannot. If the form needs JPG, convert the signature with a PNG to JPG converter first, then compress the JPG to 20KB.
Not always. The compressor's 20KB means 20,480 bytes, while a form counting in thousands stops at 20,000 bytes, so a file between the two would be rejected. Set the target to 19 to stay under both definitions.
Other target sizes
Reviewed by Raja Jahangir · Last reviewed: October 7, 2026
