How to Compress an Image to 20 KB, 50 KB or 100 KB
You are filling in an application โ a university form, a job portal, a government service โ and it refuses your photo: maximum file size 20 KB. Your phone camera produced a 4 MB image. That is two hundred times too big, and the form gives you no way to fix it.
Here is how to hit an exact file size without making the photo look terrible, and why the obvious approach usually fails.
Why simply resizing does not work
Most people start by making the image smaller in pixels, which does help โ but file size and pixel dimensions are not the same thing. A JPEG's size depends on three things: how many pixels it has, how much detail is in the picture, and the quality setting used when it was saved.
That last one is the lever that matters. Dropping JPEG quality from 95% to 70% typically cuts the file by two thirds with almost no visible difference, because the compression discards detail that your eye was not using anyway. Only when quality is pushed very low do the blocky artefacts appear.
So the right approach is: find the highest quality setting that still fits under the limit, and shrink the dimensions only if quality alone cannot get you there.
That is exactly what the tool above does โ it tries a range of quality settings, checks the resulting size after each attempt, and converges on the best one that fits your target. Then it tells you which quality it used, so you know how much room you had.
Common size limits and what they mean in practice
| Limit | Typically asked for by | Realistic quality |
|---|---|---|
| 20 KB | Older government and exam portals | Tight โ expect a small photo, around 200ร250 px |
| 50 KB | Many application forms | Comfortable for a passport-style headshot |
| 100 KB | Job portals, university applications | Good quality at normal photo dimensions |
| 200โ500 KB | CV attachments, profile pictures | Barely any visible compression |
| 1โ2 MB | General uploads, email attachments | Full quality |
Check the minimum dimensions too
This catches people out constantly. A form will say maximum 20 KB and also minimum 200 ร 230 pixels. Compress carelessly and you satisfy the first rule by breaking the second.
Crop the photo to roughly the right shape first, then compress. Cropping away background you do not need is the cheapest way to save file size, because there are simply fewer pixels to store.
When you are allowed to choose the format
If the form accepts WebP, use it โ the same picture at the same visual quality is usually 25 to 35 per cent smaller than JPEG. Most forms still ask for JPG, so check before assuming.
Never submit a PNG photograph. PNG is lossless, which is excellent for logos, screenshots and anything with flat colours or transparency, and terrible for photographs โ a PNG of a face can easily be ten times the size of the equivalent JPEG.
If it is a passport or ID photo
Size limits usually come alongside strict dimension rules โ 35 ร 45 mm in Sri Lanka, India, the UK and most of Europe, 2 ร 2 inches in the United States. Get the crop and proportions right first, then compress.
Five habits that avoid the problem entirely
- Photograph at a sensible distance. Filling the frame with the subject means fewer wasted pixels and a smaller file for the same useful detail.
- Crop before compressing, not after. Every pixel you remove is a pixel that does not need compressing.
- Keep the original. Compression is one-way โ you can always make another small copy from a large original, never the reverse.
- Do not screenshot a photo to shrink it. You get a lower-quality image at your screen's resolution, which is often bigger than the original, not smaller.
- Check the result before uploading. Open the compressed file at full size. If your face has visible blocks around the edges, allow slightly larger dimensions and try again.
Frequently asked questions
How do I compress a photo to exactly 20 KB?
Lower the JPEG quality rather than only shrinking the dimensions, and reduce dimensions only if quality alone cannot reach the target. A tool that searches quality levels automatically will find the best fit.
Does compressing an image reduce its quality?
JPEG and WebP compression is lossy, so some detail is discarded. Between 70 and 85 per cent quality the loss is usually invisible while the file is a fraction of the size.
Why does my form reject the photo even though it is small enough?
Most forms also set minimum pixel dimensions. Compress by lowering quality rather than shrinking the image below that minimum.