How It Works

Image Compression

WebAssembly and jSquash codecs — fast, private, in-browser compression for JPEG, PNG, WebP, and AVIF.

jSquash Codecs

A collection of industry-standard image compression libraries compiled to WebAssembly — the same engines powering Squoosh.

  • Multi-format: JPEG, PNG, WebP, AVIF
  • MozJPEG, Oxipng, and WebP encoders
  • Quality control — fine-tune size vs. fidelity
  • Parallel processing across multiple images

WebAssembly Runtime

Near-native performance in the browser with SIMD acceleration — runs at ~95% of native C++ speed.

  • SIMD acceleration for parallel compression
  • Memory streaming for large images
  • Consistent performance across modern browsers
  • Cached after first load — works offline

Compression pipeline

1

Image Input

Decode input image data

2

Preprocess

Normalize and prepare pixels

3

Compress

Apply jSquash codecs

4

Optimize

Balance size and quality

5

Encode Output

Generate optimized file

Format comparison

FormatCompressionQualitySpeedBest for
JPEG (MozJPEG)HighVery goodFastPhotos, web images
PNG (Oxipng)ModeratePerfectModerateGraphics, transparency
WebPVery highExcellentFastModern web, animation
AVIFHighestExcellentSlowerNext-gen web images

Technical specifications

Input formatsJPEG, PNG, WebP, AVIF, BMP, TIFF
Output formatsJPEG, PNG, WebP, AVIF
Max image size8192×8192 px (auto-resize for larger)
Color spaceRGB, sRGB
Module load (first visit)2–5 s
Module load (cached)< 0.5 s
Processing 1024×768 JPEG1–2 s
Memory usage50–200 MB

jSquash codecs

The same WebAssembly codecs powering Google Squoosh — MozJPEG, Oxipng, WebP, and AVIF encoders.

Works offline

Once the 5–10 MB WASM module is cached, compression runs without any internet connection.

Completely free

No subscriptions, no limits. Compress unlimited images using open-source jSquash libraries forever.