Image Compressor


Drop an image here, or click to browse

JPEG · PNG · WebP · GIF · BMP
pixels
Original
Original image preview

Compressed
Compressed image preview

How It Works

This tool compresses and converts images entirely inside your browser using ImageMagick compiled to WebAssembly via the open-source magick-wasm library. Your images are never uploaded to a server.

Options
OptionDescription
Output Format Choose JPEG for photos (lossy, smallest files), PNG for graphics with transparency (lossless), or WebP for excellent compression with broad browser support.
Quality Controls how much detail is retained versus file size reduction for lossy formats (JPEG and WebP). 80% is a good default; lower values produce smaller files with more visible artifacts. Quality has no effect for PNG, which is always lossless.
Limit max width Scales the image down proportionally so that its width does not exceed the specified pixel value. The aspect ratio is preserved. Images already narrower than the limit are not scaled up.
Implementation Details

The magick-wasm library is loaded once from a CDN on the first compression. The ~14 MB WebAssembly binary is downloaded and compiled by the browser's built-in WebAssembly engine — no plugins or extensions required. Subsequent compressions within the same session reuse the already-loaded engine.

Processing steps:

  1. The selected file is read into an in-memory Uint8Array via the FileReader API.
  2. ImageMagick decodes the image into an uncompressed pixel buffer.
  3. If a max width is set and the image is wider, it is resized proportionally.
  4. The quality setting is applied (JPEG / WebP only).
  5. ImageMagick re-encodes the image into the chosen format and returns a new Uint8Array.
  6. A preview is displayed using a Blob URL, and you can download the file.
Privacy

All image processing runs locally in your browser tab. No image data, file names, or metadata are ever sent to any server.