Compress Image to Exact KB

Shrink a photo to a target size like 50, 100 or 200 KB in your browser, with no upload.

Compress an image to a target size

Drop photos here or choose images

JPG, PNG or WebP, one or many. You can also paste with Ctrl/⌘ + V. Nothing is uploaded.

Target size
Advanced options
Never shrink narrower than this.

No photo handy? (a fictional 3000×2000 lighthouse picture).

How it works

  1. Add your photos. Drop JPG, PNG or WebP images on the box, pick them, or paste one with Ctrl/⌘ + V. They are read in your browser, never uploaded.
  2. Pick a target size. Choose 20, 50, 100, 200, 500 KB or 1 MB, or type your own. The tool tries qualities until it finds the highest one that fits, and shrinks the dimensions only if it has to.
  3. Download. Each card shows before and after, the new size, quality and dimensions. Save files one by one or with Download all, named like photo-100kb.jpg.

Questions, answered

Are my files uploaded anywhere?

No. Compress Image to Exact KB runs entirely in your browser. Your files are read into memory on your device, processed with JavaScript, and never sent to a server. You can disconnect from the internet and it keeps working.

How does it hit an exact size like 100 KB?

It re-encodes the photo several times, using a binary search on JPEG or WebP quality to find the highest quality that still fits under your target. If even a fairly low quality is too big, it reduces the width and height in small steps and searches again, never going below the minimum width you set. To be safe, 100 KB is treated as 100,000 bytes, so the file passes whether a site counts 1,000 or 1,024 bytes per KB.

What happens to location (GPS) and camera data?

It is removed from every result. Compressed photos are drawn fresh onto a canvas, which keeps only the pixels, so EXIF data such as GPS position, camera model and date is not copied; rotation is applied first, so pictures stay upright. A photo that is already under the target keeps its pixels untouched, and the metadata segments are cut out of the file instead.

Is it really free?

Yes. It is open source under the MIT license, with no account, no limits on files and no ads. If it saves you a paid subscription, you can say thanks on Ko-fi.

Does it work offline?

Yes. After your first visit the page is cached by a service worker, so it loads without a connection. You can also install it from your browser's menu as an app.

Was this written by AI?

Yes. Compress Image to Exact KB was generated by Claude Code from a written specification inside an automated pipeline, with a test suite that runs in a real browser. The full source is on GitHub, so you can read every line before you trust it with your files.

Built by one person, given away for free

Compress Image to Exact KB is a free alternative to paid tools like iLoveIMG Compress Image and ReduceImages. If it earns a place in your bookmarks, a coffee keeps the updates coming.

☕ Support Or on Ko-fi