All articles
Informational5 min13 April 2026

What Is Client-Side Image Compression and Why It's Private

Most people have used an online image compressor without thinking much about where the compression actually happens. The answer matters more than it might seem. 'Client-side' compression means everything happens on your device — in your browser, using your CPU. 'Server-side' compression means your file is uploaded to a remote server, processed there, and returned. The distinction has real implications for privacy, speed, offline capability, and data compliance. This article explains exactly what client-side compression is, how it works technically, and when it matters.

Client-Side vs Server-Side: The Fundamental Difference

In web development, 'client' refers to your device — your browser, your computer. 'Server' refers to remote infrastructure operated by the service provider. Server-side image compression: you drag an image into the browser interface → your image is uploaded over HTTPS to the service's server (in a data centre somewhere) → the server processes the image → the compressed result is sent back to your browser. Client-side image compression: you drag an image into the browser interface → the browser reads the file from your local disk into browser memory → JavaScript and WebAssembly code running inside your browser performs the compression → the compressed file is offered for download, never having left your device. The key question is: does your image travel across the internet? With server-side tools, yes. With client-side tools, no.

What Makes Client-Side Compression Possible: WebAssembly

For most of web history, browsers could only run JavaScript — which is fast enough for UI interactions but too slow for computationally intensive operations like image compression. WebAssembly (Wasm) changed this. WebAssembly is a binary instruction format that runs in browsers at near-native speed. It allows C, C++, and Rust programs — which previously could only run as native applications or server software — to be compiled and executed inside a browser tab. The compression libraries used for high-quality image processing — MozJPEG, libjpeg-turbo, libwebp, OxiPNG, libavif — are all C/C++ libraries. These have been compiled to WebAssembly, which means your browser can execute the same professional-grade compression code that runs on servers, entirely locally, on your device.

The Privacy Advantage in Plain Terms

When you use a server-side compressor (TinyPNG, iLoveIMG, Canva, Smallpdf), the following happens: your file is sent over the internet to a company you may know little about, it exists on their servers, it is processed by their software, it may be logged, and it is eventually deleted (you hope). Even with good intentions, the file has left your control. When you use a client-side compressor (MiniFiles, Squoosh), none of this happens. Your file is read by code running inside your browser sandbox — a strictly isolated environment. The file never makes a network request. No company ever receives a copy. This is not a marketing promise — it's a technical fact. You can verify it by watching your browser's network requests in Developer Tools: a genuine client-side compressor makes no network request carrying your image when processing it.

Performance: Is Client-Side Compression Slower?

For single images, client-side compression using WebAssembly is actually faster than server-side tools for most users — because it eliminates the upload time. If you have a 5 MB photo and a 50 Mbps upload connection, uploading takes approximately 1 second. If your connection is slower (mobile, shared Wi-Fi), upload time dominates. Client-side compression processes the file in browser memory immediately — no upload latency. The compression computation itself (running WebAssembly) takes 0.1–2 seconds per image depending on resolution and codec. For large batches (50+ images), server-side tools have an advantage because they run on powerful hardware in parallel. Browser-side batch processing runs sequentially on your local CPU.

Offline Capability: Working Without Internet

Because client-side compression tools run entirely in your browser, they can work offline after the initial page load — if built as a Progressive Web App (PWA). The WebAssembly libraries and JavaScript are cached by your browser. Once loaded, the tool continues to function even if you disconnect from the internet. This is practical for: compressing files on a plane or train with poor connectivity, working in offices with restricted internet access, compressing sensitive files on an air-gapped machine (after initial load), reliably processing files when server availability might be an issue. Not every client-side tool is built this way: MiniFiles, for example, loads its engines on demand and is not a PWA, so it needs a connection.

When Client-Side Compression Has Limits

Client-side compression is not always the right choice. Its limitations: (1) Available RAM constrains the maximum file size and batch size — a 200 MB RAW photo may cause browser tab crashes. (2) CPU performance varies by device — compression on a 5-year-old laptop takes longer than a 2024 MacBook. (3) Some advanced compression operations (OCR in PDFs, lossless WebP encoding at maximum quality) are more practically done server-side. (4) Browser APIs limit some file system operations — no direct folder watching or automated pipelines as you'd have with a desktop app. For everyday compression tasks — website images, email attachments, PDF reduction, social media photos — client-side compression is faster, more private, and entirely sufficient.

Key takeaways

  • Client-side compression: image is processed in the browser using WebAssembly — no upload, no network request, no third-party copy.
  • WebAssembly allows professional C/C++ compression libraries (MozJPEG, OxiPNG, libwebp) to run inside the browser at near-native speed.
  • Verify client-side: open Developer Tools → Network tab → no upload request should appear when compressing.
  • Client-side is faster than server-side for single images (no upload latency); server-side has advantages for very large batches.
  • Works offline after initial page load if built as a PWA — files cached in browser.
  • Limits: RAM constrains maximum file size; no desktop-app-level automation or folder watching.

Frequently asked questions

Does client-side compression use my CPU?

Yes. Client-side compression uses your device's CPU to run the WebAssembly compression code. You may notice CPU usage briefly spike during compression of large files or batches. This is normal and the process completes quickly.

How can I verify that a compressor is truly client-side?

Open your browser's Developer Tools (F12), go to the Network tab, clear the log, and drag an image into the compressor. If no network requests appear carrying your image data, the compression is genuinely client-side. Legitimate client-side tools make zero upload requests.

Is client-side compression as good quality as server-side?

Yes — both use the same underlying compression libraries (MozJPEG, OxiPNG, libwebp). WebAssembly makes it possible to run these professional-grade codecs in the browser with identical output quality.

Can I use a client-side compressor on my phone?

Yes. Modern mobile browsers (Chrome for Android, Safari for iOS) support WebAssembly. Client-side compressors work on mobile, though performance is slower than desktop for large batches.

Try it now — free

Compress PNG, JPEG, and PDF files in your browser. No upload, no installation.

Compress images