Compress Image to 20KB
Shrink any JPG, PNG or WebP photo to a 20KB maximum (or 50KB, 100KB, 200KB, or your own size) for strict upload forms. Free, no sign-up, and everything runs in your browser.
Exact crop always fixes the dimensions. Otherwise, uncheck the box to allow further shrinking. No mode enlarges your image. Maximum output canvas: 16 million pixels.
Compression is done locally with the Canvas API. No upload, no account, no watermark.
Check both the byte limit and pixel dimensions
The default 20KB limit means 20,000 bytes. Select KiB if your form uses 1,024 bytes per unit; 20KiB allows 20,480 bytes. The result shows the actual encoded byte count and how far it is below or above your chosen limit. Compression aims for at or under the limit, without padding the file to an exact size.
Use Fit within a box to preserve the whole image inside maximum width and height bounds. Use Center crop for an exact shape, such as a portrait or signature area; content outside the center crop is removed. Check the preview before downloading. The tool never stretches or enlarges your source. Exact crop locks the requested pixels. For other modes, keep the dimensions checkbox selected if a portal requires fixed pixels; the result may exceed the byte limit when those requirements conflict.
Changing a requirement clears the previous download so it cannot be mistaken for a new result. Select Compress image after editing dimensions, units or a custom limit. If the limit cannot be met, the best attempt is labeled over limit. A form may also check file type, background, face position or other rules; matching pixels and bytes alone does not establish that a document meets those rules.
How the 20KB image compressor works
Most image compressors give you a quality slider and leave you to guess where the file size lands. This tool works the other way round: you set the target in kilobytes and it finds the answer. Your image is drawn onto an in-browser canvas, re-encoded as JPEG at a trial quality, and the resulting byte count is measured. A binary search then narrows in on the highest observed quality that fits under your target, usually within a dozen encodes and a few seconds.
If even the lowest JPEG quality at full resolution is too big for the target, the tool steps the dimensions down (75% at a time) and searches again. That is how a 4MB phone photo becomes a 20KB upload: mostly through smarter quality selection, with downscaling only as a fallback. The result panel shows the exact before and after sizes, the final dimensions, and the encoder quality used, so there are no surprises.
Everything happens on your device with the Canvas API. The image is never uploaded, which also means the tool works offline once the page has loaded, and there is no queue, no daily limit and no watermark.
Tips for best results
| Situation | What to do |
|---|---|
| Portal rejects files over 20KB | Use the default 20KB target. Check the measured bytes and pixels in the result. A file above the limit is clearly marked |
| Result looks too soft | Try the 50KB or 100KB preset if the form allows it; even a small size increase buys visible sharpness |
| Transparent PNG | Transparency is flattened onto a white background, since the output is JPEG |
| Very large photo (10MP+) | Choose Fit within a box first if the original exceeds the 16-million-pixel canvas limit |
| Need an exact odd size like 35KB | Enter a custom size, choose KB or KiB, then select Compress image |
Frequently asked questions
Why would I need an image under 20KB?
Many government portals, job application forms, exam registrations, visa systems and corporate HR tools reject photos or scanned documents above a strict limit, and 20KB is one of the most common caps. Resizing by hand is guesswork; this tool searches quality and, when allowed, dimensions, then reports whether the final file meets the selected byte limit.
Does compressing to 20KB lose quality?
Yes, honestly it does. Reaching a small byte limit means lossy JPEG re-encoding, and 20KB is small: fine detail and sharp edges will soften, especially on large photos. The tool always uses the highest observed quality that fits the target, and only shrinks dimensions further when allowed by your settings. For a passport-style photo or a form upload the result is normally perfectly acceptable, but keep your original file.
Which formats are supported?
You can drop in JPG, PNG or WebP images. The compressed output is always a .jpg file, because JPEG is the format that can reliably hit very small byte targets. Transparent PNG backgrounds are flattened onto white, which is what photo-upload forms expect anyway.
Is my image uploaded anywhere?
No. Compression happens 100% in your browser with the Canvas API. The image is read locally, re-encoded locally, and never sent to any server. You can disconnect from the internet after the page loads and it will still work.
What if my image cannot reach 20KB?
That is rare, but an extremely detailed image at a hard floor of quality and a tiny dimension floor may still overshoot. In that case the tool tells you honestly and gives you the smallest file found in the bounded search, rather than silently failing.