Image Compressor
Reduce image file sizes dramatically while maintaining visual quality using best-in-class compression codecs. MozJPEG for JPEG, OxiPNG for PNG, WebP, and AVIF encoding all run directly in your browser via WebAssembly. Perfect for web optimization, email attachments, social media, and storage savings. Batch process multiple images simultaneously with automatic ZIP download.
What does this tool do?
The Image Compressor reduces image file sizes using professional-grade encoding libraries compiled to WebAssembly for browser execution. MozJPEG provides superior JPEG compression with trellis quantization and progressive encoding. OxiPNG optimizes PNG files losslessly through better DEFLATE compression and palette optimization. WebP and AVIF formats offer modern compression significantly better than JPEG/PNG. You control quality settings via slider or target file size, with optional pre-resize to reduce dimensions for additional savings. Batch mode processes multiple files with results auto-zipped for download.
How it works
Images are processed locally using WebAssembly-compiled codecs. For JPEG: decoding via libjpeg-turbo, re-encoding with mozjpeg at specified quality with advanced features enabled. For PNG: OxiPNG analyzes and applies best compression strategy (filter selection, palette reduction if applicable). For WebP/AVIF: encoding via libwebp/libaom with quality settings. Optional pre-resize uses Lanczos resampling before encoding for massive size reduction on high-resolution photos. Processing runs in Web Workers to keep the main thread responsive. All compression happens client-side — images are never uploaded to any server.
Features
- Top-tier codecs: mozjpeg, oxipng, libwebp, libavif via WebAssembly
- Quality slider (20-100) or target file size (binary search)
- Optional pre-resize: clamp long-side to 2048/1024/etc
- Batch mode: drop many files, output auto-zipped
- AVIF saves ~50% over JPEG at same quality
- 100% in-browser, runs in Web Worker — no uploads
- Up to ~50 MB each file on typical laptop
How to use
- 1
Drop one or more images
JPEG, PNG, WebP, AVIF — up to ~50 MB each on a typical laptop. Select multiple files for batch processing.
- 2
Pick output format
Auto keeps input format. WebP/AVIF are usually 25-50% smaller than JPEG at same visual quality.
- 3
Set quality or target size
Quality 75-85 is the sweet spot for photos. Target size auto-tunes quality to hit your desired file size.
- 4
Enable pre-resize if needed
If source images are huge (e.g., 4000×3000 phone photos), resize to 2048 or 1024 long side for massive additional savings.
- 5
Compress and download
Click Compress; download individual files or a single .zip for batch. Compare before/after sizes.
Common use cases
Website optimization
Compress images for faster page loads, better Core Web Vitals scores, and reduced bandwidth costs.
Email attachments
Shrink photos to fit within email size limits while maintaining quality viewable by recipients.
Social media uploads
Pre-compress images before uploading to social platforms that re-compress anyway — start with smaller files.
Storage optimization
Reduce space used by photo collections, backups, and archives without perceptible quality loss.
Tips & best practices
- MozJPEG's trellis quantization gives visibly better quality at same file size vs standard JPEG encoders
- AVIF at quality 70 looks like JPEG at quality 85, with ~50% smaller file. But encoding is slower — patience for large images
- Pre-resize phone photos to 2048px long side — usually sufficient for web/social and dramatically smaller than 4000+ pixel originals
- PNG is always lossless. JPEG/WebP/AVIF are lossy — some quality loss occurs. Keep originals if you need perfect archival copies