A AppFactory

Compress Image to a Target Size

Set the exact file size you need — the tool hits it automatically, all in your browser.

🖼️

Drop an image here, or click to choose

JPG, PNG or WebP · nothing is uploaded

Exact-size compression needs a lossy format. Transparency is flattened to white for JPG.

100% private — images are processed in your browser and never uploaded.

Target the file size, not just the quality

Most image compressors hand you a quality slider and leave you guessing how big the result will be. When a form demands "under 100 KB," that means exporting, checking the size, nudging the slider, and trying again. This tool flips it around: you name the size, and it searches for the highest quality that fits — automatically dropping the resolution only if quality alone can't get there.

Private by design

The compression runs entirely in your browser with the Canvas API, so nothing is uploaded. That's faster (no round-trip) and safer for ID photos, documents and anything you'd rather not send to a server.

Common size limits

Visa and passport portals, job and government uploads, and many forums cap images at 20 KB, 50 KB, 100 KB, 200 KB or 1 MB. Use the presets above to jump straight to the limit you need.

JPG or WebP — which should you choose?

Both let you trade quality for size, which is what makes hitting an exact target possible. JPG is the safe default: every browser, form and printer accepts it, so pick it when an upload form just says "image" or "photo". WebP squeezes the same picture into roughly 25–35% less space at a similar quality, so it's the better pick when the destination is a website you control or any modern app — you'll get either a smaller file at the same quality or more quality inside the same budget. Neither preserves transparency the way PNG does, so a logo with a see-through background gets a white backing when exported as JPG.

How to keep quality high at a small size

When a target is tight, two levers control the result: the quality setting and the pixel dimensions. This tool lowers quality first and only shrinks dimensions if quality alone can't reach the target — that order keeps the most detail. A few habits help: crop out empty space before compressing (fewer pixels to spend your budget on), avoid re-compressing an already-compressed file repeatedly (each pass loses a little), and if a photo looks blocky at, say, 20 KB, accept a slightly larger size or smaller dimensions rather than pushing quality to the floor.

How the compression works

The tool loads your image, then repeatedly re-encodes it while searching for the highest quality whose output still fits under your target — a binary search rather than trial and error. If even the lowest quality is still too big, it scales the dimensions down and tries again, so you always get a file at or under your limit. Everything runs on your device through the browser's Canvas API, which is why it's instant and your image is never uploaded.

Frequently asked questions

How do I compress an image to an exact size like 100 KB?
Drop your image, type the target size in KB (or pick a preset), and the tool repeatedly re-encodes it — adjusting quality, then shrinking dimensions if needed — until it lands at or just under your target. Most compressors only give you a quality slider; this one targets the file size directly.
Are my images uploaded to a server?
No. Everything runs in your browser using the Canvas API. Your images never leave your device, which makes it private and instant.
Which formats are supported?
You can load JPG, PNG or WebP and export as JPG or WebP. Exact-size compression needs a lossy format, so PNG output is not offered; transparency is flattened to white when exporting JPG.
Why would I need a specific file size?
Many forms and sites enforce limits — visa and passport photos, government and job-portal uploads, forums, and email attachments often cap images at 100 KB, 200 KB or 1 MB.

More tools