How to Compress Images Online — JPG, PNG, WebP Compression Guide
Learn how image compression works — lossy vs lossless, how JPG/PNG/WebP compression differs, what quality setting to choose, and how to batch-compress images without losing visible quality.
Last updated:
Core Concepts
- Lossy vs lossless compression
- Lossy compression (JPG, WebP lossy, AVIF lossy) permanently discards visual data the human eye is unlikely to notice — smaller files, some quality loss. Lossless compression (PNG, WebP lossless) reduces file size without any quality loss — bigger files, perfect fidelity. Choose lossy for photos and web images (50-80% smaller). Choose lossless for logos, line art, and images that contain text.
- How to pick the right quality setting
- JPG at quality 80% is the sweet spot — indistinguishable from 100% for most photos, but 3-5× smaller. PNG compression reduces file size by optimising the DEFLATE algorithm parameters without any visual change. WebP at -q 75 typically halves the size of an equivalent JPG. The best approach: use comparison mode and slide between original and compressed to find the lowest quality that still looks good.
- Batch compression and resizing
- For a blog post with 20 images, compressing each one individually is tedious. Batch tools let you drop a folder, apply the same settings to all images, and download as a ZIP. Also consider resizing: a 4000px-wide photo scaled to 1200px (the widest most websites display) can save 70% of the file size before any compression even starts.
Frequently Asked Questions
Does compressing an image reduce quality?
Lossy compression: yes, but subtly. At JPG quality 80%, the difference is invisible on a phone screen. At quality 50%, you'll see blocky artifacts (compression squares) in gradients and sky areas. Lossless compression: no quality loss at all — PNG compression is mathematically reversible.
How do I compress images without uploading them to a server?
All compression in our Image Compressor runs in your browser via canvas, Web Workers, and native compression codecs. The image is loaded into a canvas element, re-encoded at the chosen quality, and saved locally. The browser's DevTools Network panel confirms zero HTTP requests during compression.
Try these related tools
Image Compressor →
Compress JPG, PNG, and WebP images in your browser. Two modes: fixed quality or target file size (KB). Batch supported. 100% local — no uploads, no watermark.
Image Resizer →
Resize images to exact pixel dimensions or a percentage of the original. Batch, aspect ratio lock, high-quality stepped downscale. 100% local — no upload.
Image → WebP →
Convert JPG, PNG, or GIF to WebP for 25-35% smaller file sizes at equivalent visual quality. Runs in your browser — no upload, batch supported.
Image → AVIF →
Convert JPG, PNG, or WebP to AVIF for the smallest possible file at the same quality. Runs entirely in your browser (Chrome 85+, Firefox 93+, Safari 16+).
Image Cropper →
Crop images to a custom region or a fixed aspect ratio (1:1, 4:3, 16:9, and more). Draw the crop area with your mouse. Runs entirely in your browser.