Stax

…

Tools

Image Compressor — Compress to 20KB, 50KB, 100KB

Compress an image to an exact size like 20 KB, 50 KB, 100 KB or 200 KB for passport, exam and government form uploads. Runs in your browser — no upload.

Last updated:

Drop an image here or click to upload

Target file size (result will be under this)

Upload an image, then tap a size.

Was this tool useful?

Use the tool above and you can rate it here.

Compress an image to an exact size for government forms

Passport, exam, scholarship and job portals often reject uploads that are over a strict size limit — typically 10–20 KB for a signature, 20–50 KB for a photo and 50–200 KB for a scanned document. Instead of guessing a quality slider, choose a target such as 20 KB, 50 KB, 100 KB, 200 KB, 500 KB or 1 MB, or type your own limit between 5 and 5,000 KB. The tool measures the real file size after each attempt and finds the best-looking JPEG that fits. Everything runs in your browser, so nothing is uploaded.

How target-size compression works

The compressor aims slightly under your limit to leave a safety margin. It first searches for the highest JPEG or WebP quality that fits. If the file is still too large even at reduced quality, it shrinks the pixel dimensions step by step and searches again, stopping at a sensible minimum size. If the limit cannot be reached, it shows the closest result instead of pretending it worked — crop the image first or choose a larger target.

Tips for photos, signatures and documents

Crop to the required framing before compressing, because unused background costs bytes. For a signature, scan on plain white paper and use a 10 KB or 20 KB target. For a passport-style photo, 20–50 KB usually keeps the face sharp. For a scanned document, use 100–200 KB and check that the text is still readable in the preview. Phone photos taken in portrait keep the right orientation automatically.

JPEG vs WebP

JPEG is the safe choice for government and exam websites, since almost every portal accepts it. WebP usually produces a smaller file at similar quality and works well for websites and apps, but many upload forms do not accept it. Transparent areas are filled with white when exporting to JPEG.

Manual quality mode and PNG

If you just want to trade quality for size, switch to Manual quality: pick JPEG or WebP, set the quality percentage and an optional maximum width. PNG is lossless, so it cannot be squeezed to a KB target — convert it to JPEG for a large reduction, or keep PNG when you need transparency.

Compress an image to a specific size

Have an exact limit to meet? Each page below opens this compressor with that target already selected, plus notes on what fits and how to reach it:

Testing an upload form of your own?

If you are building or checking a form with a size limit, the test file generator makes a JPG, PNG or PDF of an exact size, so you can see what your form accepts and rejects. For PDFs, the sample PDF files come in ready-made sizes from 100 KB to 100 MB.

Privacy — your files never leave your device

Compression uses the HTML5 Canvas API inside your browser. Your images are not uploaded, logged or retained after you close the tab, so the tool is safe for ID photos, signatures and confidential documents.

Frequently asked questions

How do I compress a photo to 50 KB for a government form?
Upload the photo, choose the 50 KB chip in Target size mode and the image is compressed instantly. The tool searches for the highest JPEG quality that fits under 50 KB and, if that is not enough, reduces the pixel dimensions step by step. Check the green badge, then download the file. Portals for passports, exam forms and scholarships usually accept JPEG, so keep the output format on JPEG.
Why is my result bigger than the target size?
Very large or highly detailed photos cannot always reach a tiny target without shrinking them too far, so the tool stops at a minimum size and tells you the closest result it got. Crop away empty background first, pick a slightly larger target, or use a smaller original. PNG files also cannot hit a KB target because PNG is lossless; switch the output to JPEG instead.
Should I use JPG or WebP for uploads?
Use JPEG (JPG) for government, exam, job and scholarship portals — it is accepted almost everywhere, while many upload forms reject WebP. WebP produces a smaller file at the same visual quality and suits your own website or app, but check what the form accepts before choosing it.
What if my image is already smaller than the target?
The tool tells you when the original is already under your chosen size. In that case you usually do not need to compress it at all. You can still re-encode it to change the format or shrink the dimensions, but the file may not get smaller.
Is my image uploaded to a server?
No. Compression runs entirely in your browser using the Canvas API, so your photo, signature or ID document never leaves your device. Nothing is stored or logged, which makes it safe for sensitive documents.
How do I compress a signature to 20 KB or 10 KB?
Scan or photograph the signature on plain white paper in good light, crop tightly around it, then choose the 20 KB or 10 KB chip. A signature is mostly flat white, so it compresses to a small file with little visible loss; the preview shows whether the strokes are still crisp. If the portal asks for specific pixel dimensions as well, set them first with the image resizer and compress afterwards.
Is it free, with no watermark or sign-up?
Yes. There is no account, no watermark and no daily limit. The compression runs on your own device, so nothing is queued on a server or metered per file.
What quality setting should I use in manual mode?
For web use, 70–80% gives a good balance of size and quality; for social media 80–85%; for archiving or printing 90–95%. Below about 60% you may see blocky artifacts on photos with smooth gradients. Quality applies to JPEG and WebP; PNG stays lossless.

From the blog

Related tools