How to Reduce Image Size to 20KB, 50KB or 100KB for Online Forms
Anyone who has filled out a government portal, an exam application, or a job form knows the message: "File size must not exceed 20KB." Your phone just produced a 4.2MB photo. The form wants 0.5% of that.
The usual response is to run the photo through a compressor, drag the quality slider to the floor, and upload something that looks like it was faxed. Then the portal rejects it anyway, because file size was never the only requirement.
This guide covers how to hit an exact KB target reliably, and the one step that determines whether the result looks fine or looks awful.
Why the Limit Exists
These limits aren't arbitrary bureaucracy. A portal handling a few hundred thousand applications with 4MB photos each is storing terabytes of data it has no use for. A 20KB photo displayed at thumbnail size on a verification screen carries every bit of information a human reviewer needs. The limit is a storage and bandwidth decision, and it's not going away.
Common targets you'll run into:
| Target | Typical use | Usual dimensions required |
|---|---|---|
| 10–20KB | Signature scans, exam application photos | 140×60 to 200×230 px |
| 20–50KB | Government ID portals, passport photos | 200×230 to 350×450 px |
| 50–100KB | Job applications, university portals | 400×500 to 600×800 px |
| 100–200KB | Document scans, certificate uploads | Up to 1200 px on the long edge |
Notice the pattern: every KB limit comes paired with a dimension requirement. That relationship is the whole trick.
The Step Almost Everyone Skips: Resize First
Here's the thing that makes compression easy or impossible.
File size is driven by how many pixels you're storing. A photo straight from a modern phone is around 4000×3000 pixels — 12 million of them. To get 12 million pixels into 20KB, you'd have roughly 0.013 bytes per pixel. JPEG simply cannot do that without destroying the image. You get a blocky, colour-banded mess, and the compressor was never at fault.
Now resize that same photo to 200×230 pixels first. That's 46,000 pixels. 20KB across 46,000 pixels is about 0.44 bytes per pixel — a comfortable budget where JPEG produces a clean, sharp result.
Same target file size. Completely different outcome. The only variable that changed was the dimensions.
So the order is always:
- Crop to the required aspect ratio (many forms want a specific one — passport photos are usually close to 3:4)
- Resize to the exact pixel dimensions the form specifies
- Compress to hit the KB target
- Check the format is what the form actually accepts
Do those in any other order and you're fighting the maths. You can handle all four steps free at Pro Image Edit — crop, resize, then compress, in that sequence.
Hitting the Exact Number
Once the dimensions are right, compression becomes a short search rather than a fight.
Start at quality 80. For most photos at form-appropriate dimensions, this lands close to the target already and looks essentially identical to the original.
Check the resulting size, then adjust. JPEG quality doesn't map linearly to file size, so the practical approach is to bracket it:
- Result is more than double the target → drop to quality 50 and re-check
- Result is slightly over → drop 10 points at a time
- Result is well under the target → go up in quality. An 11KB file when the limit is 20KB is a wasted opportunity; you're throwing away detail you were allowed to keep.
That last point matters more than people expect. The goal is to land just under the limit, not as far under it as possible. A photo that comes in at 19KB against a 20KB cap will always look better than one at 8KB, and both pass.
If you can't get under the limit at quality 40, stop adjusting quality. Your dimensions are still too large. Go back and resize down further.
Rough starting points
| Dimensions | Target size | Try quality |
|---|---|---|
| 200×230 | 20KB | 75–85 |
| 350×450 | 50KB | 75–85 |
| 600×800 | 100KB | 70–80 |
| 1000×1200 | 200KB | 65–75 |
These are starting points, not guarantees. A photo of a face against a plain background compresses far better than a busy outdoor scene with foliage, because JPEG works by discarding detail the eye won't miss and a plain background has very little detail to begin with.
Format Matters More Than You'd Think
Most forms specify JPEG, and there's a good reason.
JPEG is lossy and built for photographs. It's the right choice for anything with a face, a scene, or smooth gradients.
PNG is lossless. It will not discard data, which means a photo saved as PNG stays large — often 3–5× the size of an equivalent JPEG. PNG is the correct choice for a signature scan, a logo, or a screenshot with text, where sharp black-on-white edges matter and JPEG would introduce fuzzy artifacts around them.
WebP compresses 25–35% better than JPEG at the same visual quality. It's excellent for websites, but most government and institutional portals do not accept it. Check before you convert.
HEIC is what iPhones produce by default, and it's the single most common cause of "invalid file format" errors on upload forms. If your photo came off an iPhone, convert it to JPEG before you do anything else.
Signature and Document Scans
Signatures follow different rules, and the usual advice makes them worse.
A signature is black ink on white paper — sharp edges, flat colour, no gradients. That's the worst case for JPEG, which will add grey halos and speckling around every stroke.
For signature scans:
- Use PNG if the form allows it. It'll often be smaller than JPEG for this kind of image, and cleaner.
- If JPEG is mandatory, stay at quality 85 or above. Compressing a signature hard makes it look shaky and can genuinely affect verification.
- Convert to pure black and white before compressing. Removing the greyish paper background eliminates most of the data and often takes the file well under the limit on its own.
- Crop tightly to the signature. Blank paper still costs bytes.
Common Mistakes
Compressing the same file repeatedly. Every JPEG save is lossy. Compressing an already-compressed file re-encodes existing artifacts and adds new ones. Always start from the original.
Screenshotting the photo to shrink it. A screenshot re-renders the image at your screen's resolution and colour profile, usually adding size rather than removing it, and it captures whatever compression the preview already applied.
Ignoring the dimension requirement. By far the most common rejection cause. A 20KB file at the wrong pixel size fails just as hard as a 4MB one.
Uploading a photo with the wrong aspect ratio. Portals that auto-crop to fit will happily cut off the top of your head. Crop deliberately before uploading.
Using a tool that uploads your file to a server. Passport photos, signatures, and ID scans are exactly the documents you should be most careful with. Tools that process in your browser never transmit the file at all — the image stays on your device from start to finish. That difference is worth checking before you hand over a photo of your identity documents, and it's a design decision we write about in more depth over at NoCubical.
A Repeatable Process
For any form with a size limit, in order:
- Read the full requirement. Size in KB, dimensions in pixels, and accepted formats — all three.
- Start from the original file. Not a forwarded copy, not a screenshot.
- Convert HEIC to JPEG if the photo came from an iPhone.
- Crop to the required aspect ratio.
- Resize to the exact pixel dimensions.
- Compress starting at quality 80, adjusting to land just under the cap.
- Open the result full-screen and confirm it still looks like you.
Steps 4 through 6 take under a minute once the dimensions are known, and the result passes on the first upload instead of the fourth.
Frequently Asked Questions
Why does my photo get rejected even after I compress it?
Most portals check three things, not one: file size in KB, pixel dimensions, and format. Compressing only fixes the first. If the form asks for 200x230 pixels and your file is 1200x1600, it will be rejected no matter how small the file is. Resize to the required dimensions first, then compress.
What quality setting gives me a 20KB JPEG?
There is no single setting, because it depends entirely on the pixel dimensions. At 200x230 pixels, quality 70-80 typically lands between 15KB and 25KB. At 1000x1200 pixels, even quality 20 will struggle to reach 20KB and will look terrible. Get the dimensions right and the quality setting becomes easy.
Is it better to compress a JPG or convert to PNG for small file sizes?
For photographs, JPEG almost always wins. PNG is lossless, so a photo saved as PNG will be several times larger than the same photo as JPEG. Only use PNG when the image has sharp edges and flat colour, such as a signature scan or a logo. Many forms only accept JPEG anyway.
Will compressing to 20KB make my passport photo unusable?
Not if the dimensions are correct. A 200x230 pixel photo has about 46,000 pixels, so 20KB is roughly 0.44 bytes per pixel, which JPEG handles comfortably. Compression only looks bad when you try to force a large image into a small file.
Can I compress the same image twice?
You can, but avoid it. JPEG is lossy, so every save discards more detail permanently, and artifacts from the first pass get re-encoded in the second. Always go back to the original file and compress once with the right settings.
