Compress an image to the exact KB size you need
A form says your photo must be under 50 KB. Your phone gave you a 4 MB picture. CompressToKB closes that gap precisely: pick a target size, add your images, and the compressor searches for the highest quality that still fits — right here in your browser, with nothing uploaded anywhere.
Drop images here, or
JPG, PNG or WebP · add as many as you like · everything runs locally in your browser, nothing is uploaded
Add an image to begin.
Pick a target size
Why "compress to a size" is different from "compress"
Most image compressors give you a quality slider and a shrug: drag it, check the result, drag it again, until the file happens to land under your limit. When a portal rejects anything over 50 KB, "happens to" is not good enough. CompressToKB works backwards from the number you actually need. You state the target; the tool binary-searches the encoder settings until the output sits at — or just under — that size. If quality adjustments alone cannot get there, it scales the dimensions down step by step and searches again, and it tells you plainly when that has happened.
Built for batch jobs
Application season rarely involves one photo. Add a whole folder's worth of images at once — portraits, signatures, scanned documents saved as JPGs — compress them all to the same target, then download them individually or as a single ZIP. The ZIP is generated locally too, using a small store-only ZIP writer built into this page.
Private by construction
There is no server behind this tool. Your images are decoded and re-encoded by your own browser using the Canvas API, which means a passport photo or a signature scan never crosses the network. Close the tab and nothing remains. You can verify this yourself: open your browser's network monitor, compress an image, and watch — no upload request is ever made. Read more in how it works and our privacy note.
Which format should you choose?
- JPG — the safe default for photographs and the format most form portals expect. See JPG compression.
- WebP — usually the smallest file at the same visual quality, ideal for websites. See WebP compression.
- PNG — lossless, so its size can only come down by shrinking dimensions. Best for screenshots, logos and anything with text. See PNG compression.
CompressToKB Pro — coming soon. Saved target profiles for the portals you use every season, whole-folder drag-and-drop with subfolder structure kept, and custom file naming. $9/month, announced here first. The free compressor above stays free.