Compress Image to Exact Size

RUNS ON THIS DEVICE

Pick a target size in kilobytes and SafeFileConvert compresses your image to fit just under it — no uploads, no software to install.

How the automatic size search works

Set a target in kilobytes — or tap one of the 20, 50 and 100 KB presets — and add your images. Each one is drawn onto a canvas inside a Web Worker, a background browser thread that keeps the page responsive while heavy work runs. The compressor then re-encodes the image and measures the result, running a binary search across quality levels: too big, drop quality; comfortably small, raise it. The search settles on the highest quality that still fits under your target.

When even the lowest sensible quality can't get there, the tool scales the pixel dimensions down in steps and searches again. And if a target is genuinely unreachable without making the picture illegible, you get the smallest readable version it produced plus an honest note that the target wasn't met — nothing fails silently.

JPEG or WebP?

JPEG is the default because practically every upload form accepts it. WebP usually encodes the same visual quality in a noticeably smaller file — often 25 to 30 percent less — which means more detail inside the same byte budget. The trade-off is compatibility: a few older portals and email clients reject it. A reasonable rule: WebP for images you control, such as your own site, and JPEG whenever a third-party system will inspect the file.

Compression that stays on your machine

There is no upload step. The file is read, re-encoded and handed back entirely within your browser tab, so no server ever holds a copy of your photo. Re-encoding through a canvas has a useful side effect too: EXIF metadata — GPS coordinates, camera model, capture time — is stripped from the output. One caveat: images already under your target are returned untouched and keep their metadata. Batch processing works the same way; add a folder's worth of images, watch each one's before and after size, and download the results as a single ZIP.

Frequently asked questions

Do my images get uploaded while compressing?

No. All reading, re-encoding and measuring happens in JavaScript running on your own machine; the images are never transmitted to a server.

Why is there no PNG output option?

Browsers encode PNG losslessly with no quality setting, so there is no dial to turn to reach a size target. PNGs are accepted as input and come out as JPEG or WebP.

Will the result be exactly the number of kilobytes I typed?

It will be under it, usually close. Since upload forms enforce a maximum rather than an exact value, a file just beneath the limit is what you actually want.

What happens when the target is impossible?

The tool returns the smallest legible version it could produce and tells you the target wasn't reached, instead of failing quietly or churning out an unusable thumbnail.

Can I run a whole batch at once?

Yes — drop in multiple images, and each is compressed to the same target with its own before and after size shown. Everything downloads together as one ZIP.