Most “free image compressor” websites work the same way. You choose a file, a progress bar runs, and a smaller JPEG comes back. What is easy to miss is the middle step: the file is uploaded to someone else’s server, processed there, and then offered as a download.

That is fine for a public marketing image. It is a poor fit for a passport scan, a contract photo, a customer’s face, or anything you would not attach to a random email. Even when a site promises to delete uploads, you have already given them a copy.

I wanted a compressor I would use on files I actually care about. So I built one that never sends the image anywhere. The file is read in the browser, compressed in memory, and saved back to your downloads folder. You can try it here: free image compressor (files stay on your device).

What “client-side” means in practice

“Client-side” is not a marketing slogan in this case. It is a constraint on the architecture.

When you pick an image, the page uses the browser’s File API (or a drag-and-drop DataTransfer) to get a File object. That object lives in the page’s memory. A <canvas> — or, on newer browsers, createImageBitmap plus a canvas — decodes the image, optionally resizes it, and re-encodes it with canvas.toBlob(). The result is another Blob, which is turned into an object URL and downloaded with a temporary <a download> link.

If you open your browser’s Network panel while you compress a photo, you should not see the image posted to an API. After the page itself has loaded, the tool can even keep working if the connection drops. That is the test I use when I say files never leave your device.

This is the same idea behind other privacy-minded tools, such as Squoosh. The difference is that I wanted it sitting next to a set of PDF and Office converters that follow the same rule, so you are not bouncing between five different “trust us” upload sites.

The parts that actually matter

A first version of a browser compressor can be written in an afternoon. Making it pleasant — and honest about quality — takes a bit more care.

Decoding. Not every file is a simple JPEG. Browsers are good with JPEG, PNG, and WebP. They are less consistent with HEIC from phones, or with unusual TIFF files. If the browser cannot decode it, the tool should say so clearly rather than fail silently. I would rather show a limitation than pretend every camera format is supported.

Resize before quality. If someone needs a 200 KB file for a form, dropping JPEG quality from 90 to 40 on a 4000-pixel photo is the wrong first move. The file is still huge because the pixel count is huge. Offering a max width and height (for example, “fit within 1920px”) usually shrinks the file more, with less visible damage, than crushing the quality slider. The compressor lets you do both: cap the dimensions, then set quality.

Format choice. Re-encoding a photograph as JPEG or WebP at a sensible quality is usually the right call. Re-encoding a screenshot or a graphic that already has sharp text as a low-quality JPEG is how you get muddy edges. For graphics, PNG or a high-quality WebP is kinder. The tool should not silently switch formats in a way that surprises you; you should see what you are downloading.

The quality slider is not a promise. canvas.toBlob(..., 'image/jpeg', 0.7) does not mean “70% of the original file size,” and it does not use the same encoder as Photoshop or mozjpeg. It means “ask the browser’s JPEG encoder for quality 0.7.” Different browsers produce different bytes. The only honest UI is a before-and-after preview, plus the resulting file size, so you can decide if the trade-off is good enough.

Batch mode. People rarely have one image. A usable tool should accept several files, compress them with the same settings, and let you download them one by one or as a group, without uploading a zip to a server. Everything still happens in memory, which leads to the next point.

Limits I accepted on purpose

A browser tab is not a dedicated compression workstation.

Very large photos (dozens of megapixels) can strain memory, especially on a phone. Batch-compressing twenty huge PNGs at once can freeze the tab. I would rather process files in sequence, or warn you, than pretend the tab is a server with 32 GB of RAM.

Client-side encoding is also not always the smallest possible file. A carefully tuned mozjpeg or jpegli encode, or a good AVIF encode in a WebAssembly module, can beat a plain canvas export. Those options are worth adding over time. They still do not require an upload — WebAssembly can run in the page too — but they make the first version heavier. I started with the APIs every modern browser already ships, because the privacy guarantee should not depend on a large extra download.

Finally, a client-side tool cannot “repair” a badly taken photo or invent detail that quality compression removed. If you need print-level files, compress less — or do not compress at all.

How I use it

A simple path for a form that demands “under 200 KB”:

  1. Open the image compressor.
  2. Add the photo. It does not leave your device.
  3. Set a maximum dimension that still looks sharp on screen (often 1280 or 1920 pixels on the long side).
  4. Start with a mid-range quality setting, check the preview at 100% on a detailed area (text, an edge, a face), and only then drop quality if the file is still too big.
  5. Download the result and, if you want, compare it with the original file size in your downloads folder.

For a website hero image, I care more about the preview than the exact kilobyte count. For a document scan, I care more about readable text than colour accuracy.

If you next need those images in a single PDF, there is a companion tool that follows the same no-upload rule: image to PDF. The rest of the set lives at AG Toolkit.

Why I am not asking you to sign up

The compressor does not have accounts, watermarks, or daily caps, because those features usually exist to justify a server. Once you decide the work happens in the browser, a lot of the usual product machinery becomes unnecessary. You open the page, shrink the file, and leave.

If you want to see how I approach the rest of my work — websites, apps, custom software, and practical AI features — I am Anmol Gupta, AI Engineer & Full Stack Developer. I also write on DEV.to and keep code on GitHub. The compressor is a small tool, but the rule it follows is the one I want for anything I build: do the job, and do not take data you do not need.

Anmol Gupta, AI Engineer & Full Stack Developer. Portfolio: iamanmolgupta.com · LinkedIn · GitHub