Compress Image to Exact KB — 20KB, 50KB, 100KB, 200KB
Compress Image to Exact KB — Free Online Tool
Compress any image to an exact file size — 20KB, 50KB, 100KB, 200KB or any custom KB. Your photo never leaves your device: everything runs in your browser, with no upload and no sign-up. Perfect for exam forms, job portals and online applications.
Free Tools › Image Tools › Compress Image to Exact KB
Compress Image to Exact KB — 20KB, 50KB, 100KB or 200KB
Most compressors give you a quality slider and a random result. This one works the other way: you type the exact size you need and the tool finds the best quality that fits — for exam forms, job portals and online applications that reject any file over the limit. Free, no signup, and your image is never uploaded — everything happens in your browser.
Read the guide: How to Compress an Image to 100KB (or Any Exact Size) Free Online
Drop your images here, or click to browse
JPG, PNG or WebP — add one photo or a whole batchTarget size — pick one or type your own
Output format
JPG is accepted by almost every portal. WebP usually gives a smaller file at the same quality, but some older exam and government portals do not accept it — when in doubt, keep JPG.
Results
How to compress an image to an exact size in KB
Add your image
Drag and drop a JPG, PNG or WebP photo, or click to browse. You can add several images at once — all of them get the same target size.
Set the exact target
Tap a preset — 20KB, 50KB, 100KB, 200KB — or type any custom size the portal asks for, like 30KB or 150KB.
Compress & download
Press the button. The tool tests quality levels behind the scenes and keeps the sharpest version that fits under your limit. Download and upload it to the portal.
How the exact-size search works
A normal compressor makes you guess: drag a slider, export, check the size, repeat. This tool removes the guessing. It re-encodes your photo at many quality levels using a binary search — the same fast method computers use to find a number in a sorted list — and keeps the highest quality whose file size is at or under your target. If even the lowest quality is still too big (common with a 20KB target on a large photo), it reduces the dimensions step by step and searches again, until the file fits. The result is normally within a few KB of your target, never over it.
Everything runs on your own device with the browser's built-in Canvas technology. There is no server and no upload queue, so a photo of your ID, signature or documents never leaves your phone or computer.
When do you need an exact KB size?
Exam & admission forms
Exam and admission portals commonly ask for a passport photo and signature inside a strict range — often things like a photo under 100KB or a signature under 20–50KB. A file even slightly over the limit gets rejected, which is exactly the problem an exact-target tool solves.
Job applications & government portals
Online job applications and government service portals set maximum upload sizes for photos, CNIC/ID scans and certificates. Compressing each document to just under the stated limit avoids the failed-upload loop at the last step of a long form.
Email attachments
A phone photo can be 3–8 MB. Bringing it down to 200KB keeps the email light and fast to send, while still looking perfectly fine on screen.
Websites & online shops
Smaller product and blog images make pages load faster, which visitors and search engines both reward. 100–200KB is a practical target for most web images.
Which target size should you choose?
| Target | Best for | What to expect |
|---|---|---|
| 20 KB | Signatures, small ID photos, strict portals | Very small file; large photos will also shrink in dimensions. Fine for a signature or a small photo slot. |
| 50 KB | Passport-size photos for forms | A good balance for form photos — small enough for most portals, still clear at passport-photo size. |
| 100 KB | The most common portal limit | Sharp on screen and accepted almost everywhere a 100KB maximum is stated. |
| 200 KB | Document scans, certificates, email | Readable text on scanned documents with a file that still uploads quickly. |
| 500 KB | High-quality web images | Near-original quality for blogs and shops where the limit is generous. |
Tips for a better result
- Match the portal's number exactly. If the form says "photo must be 20KB – 50KB", set the target to 50 KB — the largest allowed size gives you the best quality that still passes.
- Crop before you compress. A passport photo cropped to the face compresses far better than a full-body shot squeezed into 20KB.
- JPG for portals, WebP for the web. Some older portals reject WebP files even when the size is right. JPG is the safe choice for forms.
- Transparent PNGs turn white on JPG. Logos with transparency get a white background in JPG output. That is normal — most portals expect exactly that.
- Already small enough? If your file is already under the target, the tool keeps your original untouched instead of re-encoding it and losing quality for no reason.
Before and after: a real example
One phone photo, compressed for a form with a 100KB limit. This is a real test on this page, not a made-up number:
| Before | After | |
|---|---|---|
| File size | 4.35 MB | 98.2 KB |
| Target | 100 KB limit | Under the limit |
| Saving | - | 98% smaller |
Your own photo will differ: a plain sky compresses far more than a busy crowd scene. The tool shows the before and after size and the saving for every file, so you always see the real result before you download.
Supported formats
| Formats | Notes | |
|---|---|---|
| You can add | JPG, PNG, WebP | One photo or a whole batch at the same target size. |
| You get back | JPG or WebP | JPG is the default and is accepted by almost every portal. WebP is usually smaller at the same quality. |
| Transparency | PNG with transparency | Transparent areas become white in JPG output. Choose WebP if the transparency must stay. |
| Not supported | HEIC, GIF | iPhone HEIC photos need converting first: use the free HEIC to JPG Converter, then compress the JPG here. |
Frequently asked questions
How do I compress an image to exactly 100KB?
Add your image, choose the 100KB preset (or type 100 in the custom size box), and press Compress. The tool tests different quality levels in your browser and picks the highest quality version that fits within 100KB, then lets you download it. The same steps work for 20KB, 50KB, 200KB or any other size.
Is my image uploaded to a server?
No. All compression happens inside your browser using the Canvas API. Your image never leaves your device, which makes this tool safe for ID photos, signatures, documents and personal pictures.
Why does the result come out slightly under the target size?
The tool aims for the largest file that still fits under your target, usually within a few KB of it. A file of exactly 100.0KB is rarely possible because image encoding works in steps, so the result lands just below the limit — which is what upload portals check for.
What if my photo cannot reach a very small size like 20KB?
For very small targets the tool first lowers the quality, then reduces the image dimensions step by step until the file fits. If a photo still cannot fit without becoming unusable, you get the smallest version it could make, clearly marked.
Which formats are supported?
You can add JPG, PNG and WebP images. Files are saved as JPG by default because it compresses photos best; WebP output is also available and usually produces an even smaller file. Transparent PNG images saved as JPG get a white background.
Can I compress many images at once?
Yes. Add several images and all of them are compressed to the same target size. Download each one separately, or use the Download All button to save them one after another.
Does compressing reduce the quality of my photo?
Some quality loss is unavoidable when a file gets smaller, but this tool is built to lose as little as possible: it keeps your original dimensions whenever it can and only lowers quality — or size — as much as your target requires.
More free tools: HEIC to JPG Converter · Images to PDF Converter · All Free AI Tools
Related guides
- How to Compress an Image to 100KB (or Any Exact Size) Free Online
- How to Convert HEIC to JPG Free: iPhone, Windows and Mac
- Images to PDF Converter — turn JPGs into a single PDF
About the author
AIToolsHub Team builds free AI tools and calculators — prompt generators, image tools and money calculators. Every tool is tested by the team before publishing, and figures are checked against official sources. More about AIToolsHub Team.
Comments
Post a Comment