Compress Image
Optimize JPG, PNG, WebP, and AVIF photos locally with real-time quality calibration, target KB mode, and a split before/after visual inspector.
- 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
Visual comparison
How to compress an image without losing sharpness
-
Drop, pick, or paste your images
Add up to 40 JPG, PNG, WebP, or AVIF files (up to 50 MB each), or press Ctrl+V / Cmd+V to paste a screenshot straight from your clipboard.
-
Tune quality, exact KB target, format, or dimensions
Slide quality to watch a single image recompress in real time, switch to Target size to land automatically under 100 KB / 250 KB / 1 MB, or convert heavy PNGs and JPGs to WebP or AVIF.
-
Inspect pixel edges and download
Click Inspect on any finished image to sweep the split curtain between original and compressed pixels alongside the measured PSNR score, then save individually or as a local ZIP.
Image formats and codecs at a glance
| Format | Browser WASM codec | Typical savings | Best use case |
|---|---|---|---|
| JPG / JPEG | MozJPEG WASM (trellis + progressive) | 40% – 75% | Photographs, email attachments, legacy portals requiring .jpg |
| PNG | libimagequant + OxiPNG Rust WASM | 60% – 85% | UI screenshots, logos, diagrams, graphics needing alpha transparency |
| WebP | Google libwebp WASM (method 6 + Sharp YUV) | 50% – 82% | Modern websites, blogs, e-commerce catalogs (supports alpha) |
| AVIF | libaom AV1 WASM (SSIM-tuned) | 60% – 88% | Smallest possible web hero images and high-res photography |
Choosing the right format when you compress an image
Good image compression starts with picking the right format for the job, not just cranking a slider down until artifacts appear:
JPEG for photographs and rich gradients
Photographs contain thousands of subtle tonal transitions that lossless formats struggle to pack efficiently. Our MozJPEG WASM encoder applies multi-pass trellis quantization—evaluating alternate DCT coefficient paths to pick the shortest bit representation for the same perceived detail—combined with progressive scan encoding and HVS quantization tables. Compared with basic browser canvas exports, MozJPEG saves an extra 15%–30% at matching visual fidelity.
PNG for screenshots, UI graphics, and sharp transparency
Standard browsers encode PNGs as bloated 32-bit RGBA files with weak compression. When you compress a PNG here below quality 98%, libimagequant performs perceptual palette quantization with adaptive Floyd-Steinberg dithering, followed by OxiPNG testing multiple PNG row filters and optimal DEFLATE packing. Transparency remains smooth and clean while file sizes regularly fall by 65%–85%. Need zero pixel changes for archival masters or medical/CAD captures? Move the quality slider to 100% (Lossless) to run pure OxiPNG optimization.
When to switch to WebP or AVIF
- Switch to WebP for web pages, documentation screenshots, Shopify/WooCommerce product galleries, and app assets. Our libwebp WASM encoder runs at maximum compression effort (
method: 6) with Sharp YUV enabled, eliminating the fuzzy color fringes around red or blue text that standard WebP converters suffer from. - Switch to AVIF when every kilobyte matters on high-traffic hero banners or photography portfolios—AV1 intra-frame compression cuts sizes roughly 45%–55% below comparable JPEGs (and the AVIF codec is lazy-loaded only when you choose it).
- Keep Original when uploading to strict job portals, visa applications, or legacy email tools that reject
.webpor.avifextensions.
Hitting strict upload caps without trial and error
If a form rejects your file with "Image must be under 200 KB", switch Image mode to Target size, click 250 KB or type 200, and let the worker's binary search dial in the exact optimal quality automatically. If you are also trimming large document attachments, visit our reduce PDF size tool or return to the file compressor homepage.
More local compression tools
File compressor
Compress images alongside PDFs and general files in a single local queue.
PDF toolReduce PDF size
Shrink PDF documents by recompressing embedded graphics while keeping text crisp.
GuideHow to zip a file
Pack compressed photo batches into a standard ZIP archive without extra apps.
GuideQR code file transfer
Send optimized images from laptop to phone fast after shrinking them locally.
Compress image FAQ
Are my photos uploaded anywhere when I compress an image here?
Never. Image decoding, resizing, quantization, and WebAssembly encoding all execute in a local Web Worker inside your browser. Your photos stay strictly on your device.
How does PNG compression achieve 70%–85% savings without turning transparent backgrounds black?
At quality levels below 98%, our worker runs libimagequant WASM to build a perceptually optimized RGBA color palette (preserving smooth semi-transparent alpha edges) and then packs it with Rust OxiPNG. At 100%, quantization is bypassed for 100% pixel-exact lossless OxiPNG optimization.
How does Target Size mode work?
When you enter a cap like 200 KB or 500 KB, the worker performs a binary search across encoder quality settings to find the highest possible visual clarity that still lands underneath your byte limit. If even minimum quality exceeds the cap (for example, a 12 MP photo targeting 100 KB), it applies a gentle dimension step-down automatically.
Does image compression strip GPS location and camera EXIF metadata?
Yes. Re-encoding image pixels cleanly removes camera serial numbers, timestamps, and GPS coordinates while respecting original EXIF orientation so portrait smartphone photos stay upright.
When should I convert JPG or PNG to WebP?
Convert to WebP whenever you are publishing to a website, blog, or online store—every modern browser supports WebP, and it delivers 25%–35% smaller files than JPG or PNG with transparency included. Keep original JPG or PNG when submitting files to strict government, school, or HR portals that validate file extensions.
What does the PSNR score inside the visual inspector mean?
Peak Signal-to-Noise Ratio (PSNR) measures pixel fidelity in decibels. Scores above 38–40 dB are typically visually indistinguishable from the original at normal viewing distance; use the interactive split divider to judge text edges and gradients with your own eyes.