FileCompressor

Lossless Image Compressor

Shrink PNG, WebP, and AVIF files with 0 pixel changes using pure Rust OxiPNG and libwebp Lossless WebAssembly codecs right in your browser. Free, batch-capable, zero file uploads.

  • No install
  • No upload — runs locally in your browser
  • No sign-up

Drop JPG, PNG, WebP, or AVIF images here

Up to 50 MB per image · MozJPEG, ImageQuant + OxiPNG, libwebp & AVIF with live visual inspection

Batch up to 40 images · Or paste a screenshot directly with Ctrl+V / ⌘+V

Image mode
Before4.8 MB
Saved 81%
Example: a 4K PNG screenshot
After890 KB

    How to compress images losslessly in your browser

    1. Add your master images locally

      Drop up to 40 PNG, WebP, or AVIF files (up to 50 MB each) above. The workbench opens locked to 100% · Lossless.

    2. Run 100% pixel-exact WASM optimization

      Our Web Worker bypasses color quantization and runs pure Rust OxiPNG (for PNG) or libwebp Lossless (for WebP) to optimize filters and bitstreams with 0 pixel changes.

    3. Verify lossless readout and download

      Confirm exact lossless savings in the caliper readout (with automatic retention if already optimal) and save via a local Blob URL or batch ZIP.

    Lossless codec behavior by format at 100% quality

    Format at Q100 Lossless WASM engine Pixel change Typical lossless reduction
    PNG (recommended) Pure Rust OxiPNG WASM (quantization bypassed) 0% (100% exact RGBA) 20% – 55% (benchmark: −45.3%)
    WebP (convert or keep) Google libwebp WASM (lossless=1, method=6) 0% (100% exact RGBA) 30% – 65% vs. raw PNG
    AVIF (on demand) libaom AV1 WASM (lossless=true) 0% (100% exact) 25% – 55% vs. raw PNG
    JPEG (caveat) MozJPEG Q98 + anti-bloat guard Re-encoded or original kept Retains original if not smaller

    True 100% pixel-lossless compression (zero quantization artifacts)

    Many "lossless" web compressors quietly apply lossy color reduction or re-encode JPEGs with subtle quantization loss. When you are working with medical captures, CAD/engineering diagrams, pixel art, design-system masters, brand logos, or archival screenshots, even a single altered RGB value is unacceptable.

    This page opens FileCompressor locked to 100% Quality (Lossless) so the worker takes strictly lossless paths for PNG and WebP:

    • PNG → Pure Rust OxiPNG WASM (level 3, strip safe chunks): Completely bypasses libimagequant color quantization. Instead, OxiPNG tests optimal PNG row filters, bit-depth reductions that preserve exact RGBA values, and tighter DEFLATE packing. On our open 1600×1066 UI PNG benchmark, pure OxiPNG Lossless shrunk 158.2 KB → 86.5 KB (−45.3%) with 0 pixel changes (Lossless / ∞ dB PSNR).
    • WebP → libwebp Lossless (lossless: 1, method: 6): Uses WebP's dedicated lossless transform coding (spatial prediction, color transform, LZ77 + Huffman) to deliver pixel-exact archival graphics—often 25%–35% smaller than even optimized lossless PNG.
    • AVIF → libaom AV1 Lossless (lossless: true): Available on demand by switching Output format to AVIF while keeping quality at 100%.

    Honest note about JPEG files in lossless mode

    Standard JPEG (DCT) is inherently a lossy format when decoded to RGB pixels and re-encoded. If you drop a .jpg at Quality 100% and keep format as JPEG, MozJPEG re-encodes at maximum Q98—and our built-in anti-bloat guard automatically retains your exact original .jpg file whenever re-encoding is not strictly smaller. For 100% mathematically pixel-identical compression, use PNG, WebP (Lossless), or AVIF (Lossless)—or switch to Compress Image at Q84–Q92 when visually lossless JPEG size savings are what you want.

    Technical boundaries of lossless image compression

    JPEG is inherently lossy on re-encode

    Re-encoding a JPEG through pixel decode/encode is not mathematically lossless; our safety guard keeps original JPEGs untouched if MozJPEG Q98 cannot shrink them. True pixel-exact lossless compression applies to PNG, WebP, and AVIF.

    Smaller savings than perceptual lossy modes

    Because zero pixel data is discarded, lossless reductions are typically 20%–55% rather than the 70%–85% achievable with perceptual ImageQuant or MozJPEG lossy modes.

    CPU time on large 4K lossless PNGs

    OxiPNG level-3 lossless filter search is CPU-intensive in WebAssembly (our 1600×1066 benchmark took ~2.8 s on desktop Chrome). Large 4K PNG batches take a few seconds per file on mobile devices.

    Keep Quality at 98%–100% for strict lossless

    Do not drag the Quality slider below 98% if you require zero pixel modification—below 98%, PNG switches to perceptual libimagequant palette quantization.

    Lossless image compressor FAQ

    Is compression at 100% quality truly pixel-for-pixel lossless?

    Yes for PNG, WebP, and AVIF at 100% quality. PNG completely bypasses libimagequant quantization and runs pure Rust OxiPNG lossless optimization; WebP runs libwebp with lossless=1; AVIF runs AV1 lossless mode. Every single RGB and alpha pixel value remains mathematically identical.

    How much smaller can a PNG get without changing a single pixel?

    In our reproducible Chrome benchmark on bench-ui-1600x1066.png (158.2 KB), pure OxiPNG Lossless reduced the file to 86.5 KB (−45.3%) with zero pixel alterations. Real-world PNGs exported from macOS Screenshot, Figma, or Photoshop typically drop 20%–55% losslessly.

    Why did my already-compressed JPEG stay the same size in lossless mode?

    JPEG is a lossy DCT format—decoding and re-encoding a JPEG at Q98 rarely reduces size without tiny pixel rounding. If the new JPEG is not smaller, our safety guard retains your original file untouched. For genuine lossless compression of photographic masters, start from PNG or switch output to lossless WebP.

    Does OxiPNG Lossless keep alpha transparency and ICC color intact?

    Only safe non-pixel ancillary metadata (like editor timestamps and redundant chunks) is stripped by OxiPNG; pixel RGB and alpha channels remain 100% intact. If an input PNG is already maximally packed, our safety guard keeps the original bytes.