Compress Image to 20KB Online
This tool automatically finds the highest quality that keeps your image at or under 20 KB. Drop in a photo and download the result. Everything runs in your browser, so the file never leaves your device.
Upload an image
Drop an image here, or click to browse
JPG, PNG, WebP · Max 50 MB per file
Your image stays on your device. This tool runs entirely in your browser. Your file is never uploaded to our server.
How do you compress an image to 20 KB?
Compressing an image to 20 KB here is automatic. Drop a JPG, PNG, or WebP file up to 50 MB, choose an output format, and the page re-encodes the image in your browser until it fits at or under the target. The result card shows the original size, the compressed size, and the quality setting that was used, so the change is never a guess. A typical 800px avatar that starts at 260 KB lands under 20 KB with no visible loss at its normal display size.
- 1Drop or select a JPG, PNG, or WebP file. The limit is 50 MB.
- 2Pick JPG or WebP output. WebP is smaller at the same quality and keeps transparency.
- 3The tool encodes at the highest quality that still fits 20 KB and reports the size and quality used.
- 4Download the result. Your original file is never modified and never leaves your device.
How does the tool find the best quality?
The tool does not use a fixed quality setting. It first encodes the image at quality 100 and, if that already fits under 20 KB, returns it unchanged. You never lose detail on a file that was small to begin with, and the tool never upscales an image to fill the budget. When quality 100 is too large, it runs a binary search across up to nine encodes to find the highest quality that stays at or under 20 KB.
- Original size to compressed size, so you see the exact saving.
- The quality setting actually used for your file, from 1 to 100.
- A badge that reads "Fits in 20 KB" or "Smallest possible" when the target could not be reached.
Common use cases for 20 KB images
Forum and community avatars
Most forum engines cap profile pictures around 20 KB and render them at 200 to 400px. A 1200px PNG avatar that weighs 480 KB is over the limit by a wide margin. Compressed to a 400px WebP at 18 KB, it passes the upload check and loads instantly on every page of the thread.
Form uploads with a hard cap
Government, insurance, and school portals often reject any file over 20 KB without explanation. A phone photo of a document at 3.1 MB fails immediately. This tool brings the same scan down to 19 KB as a JPG, and the text stays readable because the page keeps the highest quality that fits.
Tiny thumbnails and list views
A product grid with 40 thumbnails at 300 KB each ships 12 MB of images before the page is usable. The same thumbnails compressed to 20 KB each total 800 KB, and at 150px wide nobody can see the difference. The savings compound across every row of the list.
Chat and messaging previews
Messaging apps thumbnail attached photos before the full file sends, but the full file still has to travel. A 2.4 MB snapshot sent as a 20 KB WebP preview arrives instantly on a slow connection and still looks clean in the chat bubble.
What happens when a photo cannot reach 20 KB?
Some images will not make it. A noisy photo full of fine texture, such as foliage or a crowded street scene, can still sit above 20 KB even at quality 1. A 2000px shot of leaves might stop at 34 KB. When that happens the tool returns the smallest encode it can produce and flags the result as "Smallest possible" instead of pretending the target was hit.
JPG or WebP: which output fits 20 KB best?
For a tight 20 KB budget, WebP is usually the better pick because it compresses more efficiently than JPG at the same quality and keeps transparency. A transparent logo can become a 20 KB WebP without losing its clear background. Pick JPG when the receiving system is old or will not accept WebP; JPG fills transparent areas with white, which is fine for photos but changes the look of logos and icons.
- WebP: smaller files, keeps transparency, works in every current browser.
- JPG: maximum compatibility, but transparent areas turn white.
- Both are lossy, so the quality trade-off applies to each.
Should you resize before compressing to 20 KB?
Yes, when the photo is large and detailed. Resizing discards pixels, which is a bigger lever than compression alone for hitting a very small target. A 3000px camera photo that stalls at 90 KB under compression will usually fit under 20 KB once it is resized to 400px wide, because there are far fewer pixels left to encode. Use the resizer first, then run the fixed-size tool on the smaller file.
Why compress to exactly 20 KB in the browser?
Everything on this page runs through the Canvas API inside your browser. Nothing is uploaded, no account is required, and the encode finishes in about a second because there is no upload step to wait on. That makes the tool a reasonable choice for document scans, ID photos, and other sensitive files you would not want to send to a third-party service.
Frequently asked questions
Are my images uploaded anywhere?
No. The entire process runs locally in your browser with the Canvas API, so the file never leaves your device. There is no upload, no account, and no queue.
What if my image is already under 20 KB?
The tool returns it unchanged at full quality. It first encodes at quality 100 and, when that already fits, does not compress or upscale the file at all.
Can a PNG with transparency stay transparent at 20 KB?
Yes, if you pick WebP output. WebP keeps the alpha channel, so a transparent logo or icon survives the compression. JPG output fills transparent areas with white.
How small does the file get if 20 KB is impossible?
The tool returns the smallest encode it can produce and marks it "Smallest possible". Dense, noisy photos may only reach 30 to 40 KB, and resizing first is the usual fix.
Is a 20 KB image sharp enough for an avatar?
At the 200 to 400px sizes avatars actually render at, yes. The trade-off is invisible on screen and only shows up if you zoom in or print the image large.
What input files does this page accept?
JPG, PNG, and WebP files up to 50 MB. The ceiling exists because the tool decodes the full image into memory in your browser, and most photos are far below it.
Why does my noisy photo stay above 20 KB?
Grain and fine texture cost real bytes, because the encoder spends its budget on detail. Resize the image down to the size it will actually display at, then compress again, and the target usually becomes reachable.
You might also need
Image Compressor
Reduce JPG, PNG and WebP file sizes in your browser.
Open toolCompress Image to 50KB
Shrink an image to 50KB or smaller for email and forms.
Open toolCompress Image to 100KB
Shrink an image to 100KB or smaller for the web.
Open toolCompress Image to 200KB
Shrink an image to 200KB or smaller for attachments.
Open tool