How to compress an image to an exact size in KB
How target-size compression works for forms that demand under 50 KB or 200 KB, why the result lands just under the limit, and what to do if it will not fit.
Compression · 3 min read · Updated
The quick way
- Open Compress to Size and drop your image.
- Type the limit in KB, or pick a common one such as 20 KB, 50 KB, 100 KB or 1 MB.
- Keep Save as JPG for photos unless the form asks for another format.
- Compress, then check the reported size, quality and dimensions before you upload.
How it finds the right setting
An encoder cannot be told to produce a file of a given size. It can only be given a quality setting, and the resulting size depends on the picture: a detailed landscape needs more bytes than a plain portrait at the same quality. So the tool searches. It encodes at one quality, measures the result, then narrows the range up or down until it finds the highest quality that fits under your target.
If even a very low quality is still too big, it reduces the pixel dimensions step by step until the file fits. If you turn off Shrink dimensions if needed, the size in pixels is kept and you get the smallest file it could make, which may be above your target.
Why the result is just under the target
Because quality moves in steps, the result lands at or a little below the limit rather than on the exact byte. That is what upload forms want, since the limit is a maximum.
KB can mean 1,000 or 1,024 bytes. This tool counts 1 KB as 1,024 bytes, and so does Windows, while macOS counts 1,000. If a form counts 1,000 bytes and rejects a file that looked fine, set a target a few KB lower.
Forms with a minimum size or exact dimensions
Some portals reject files that are too small, for example a photo that must be between 20 KB and 50 KB. Set a Minimum size under More options and a JPG that comes out smaller is padded with filler data to reach it, without changing how it looks.
Passport, visa and exam portals often fix the pixel size as well. Passport & Form Photo combines the exact dimensions with the KB limit for common specifications. Requirements change, so check the official rules of the portal you are using.
Getting the best quality under a small limit
- Crop away what the form does not need. Fewer pixels leave more bytes for the face or document that matters.
- Very small limits such as 10 or 20 KB suit small images a few hundred pixels across. A large image squeezed under a tiny limit will look soft.
- Plain backgrounds compress far better than busy ones.
- If the form accepts it, WebP or AVIF fit more quality into the same size, but many forms only accept JPG.
Limitations
Scans and screenshots of text lose legibility quickly at small sizes. If a document becomes hard to read, raise the limit if the form allows it, or crop to the essential part. Because the tool runs in your browser, ID documents and passport photos are never uploaded while you compress them.
Tools in this guide
- Compress to SizeHit a file-size limit for forms and uploads. Searches quality, then dimensions, and can pad up to a minimum.
- Compress to 20KBReduce any photo to 20KB or less for forms, portals and email limits, keeping it as sharp as possible.
- Compress to 50KBReduce any photo to 50KB or less for forms, portals and email limits, keeping it as sharp as possible.
- Compress to 100KBReduce any photo to 100KB or less for forms, portals and email limits, keeping it as sharp as possible.
- Compress to 200KBReduce any photo to 200KB or less for forms, portals and email limits, keeping it as sharp as possible.
- Passport & Form PhotoExact pixel sizes and KB limits for passports, visas and exam forms (US, UK, EU, India PAN, SSC, IBPS, UPSC).
Related guides
- How to compress an image without uploading it
- How to reduce JPG file size
- How to compress PNG files (and when PNG is the wrong format)
- Lossy vs lossless compression: how to shrink images without visible loss