Image Compressor
Reduce image file size by choosing a quality level and output format — JPEG or WebP — directly in your browser. A live before/after comparison shows you the real compressed size before you download, so you can dial in the perfect balance between quality and file size without any guesswork.
How It Works
Image compression works by discarding visual information that is hard for the human eye to notice, such as subtle colour gradients and high-frequency detail. The quality slider controls how aggressively this information is removed.
At quality 100, the output is nearly identical to the original but the file size is not much smaller. At quality 60–80, most people cannot spot the difference at normal viewing distances, yet the file is often 60–80% smaller. Below quality 40, block artefacts (typical JPEG "mosaic" patterns) become visible.
This tool uses the browser's built-in Canvas `toBlob()` API to encode the compressed image. The quality value (0–100) is mapped to the 0–1 scale that `toBlob()` expects. The resulting Blob is measured in bytes to give you the real compressed file size — not an estimate.
Worked example: A 3.2 MB JPEG photo. Switch format to WebP, set quality to 78. The live readout shows 340 KB — an 89% reduction — with no visible quality loss in this case. Drop quality to 60 for 180 KB if bandwidth is critical.
JPEG vs WebP: WebP typically produces files 25–35% smaller than JPEG at the same perceived quality. However, JPEG has broader compatibility with older software. For web delivery, WebP is usually the better choice. For email attachments or legacy software, stick with JPEG.
The tool re-encodes from the full original image each time you move the quality slider, so there is no "generation loss" from re-compressing an already-compressed file repeatedly during preview.
Frequently Asked Questions
Are my images sent to a server for compression?
Never. Compression happens entirely in your browser using the Canvas API. No data is transmitted. You can disconnect from the internet and the tool still works.
What quality setting should I use?
For web images, 75–85 is usually a good starting point. It provides significant size reduction with minimal visible quality loss. For thumbnails or low-priority images, 60–70 works well. For print or archiving, stay at 90+.
What is the difference between JPEG and WebP?
WebP is a modern format developed by Google that typically compresses 25–35% better than JPEG at equivalent visual quality. Nearly all modern browsers support WebP. JPEG has wider legacy support in older software and some email clients.
Why does PNG not appear as an output option?
PNG is lossless — it does not support quality-based compression. Compressing a PNG to a smaller PNG requires removing colour depth or metadata, which this tool does not do. Use the Image Converter tool to convert to PNG.
Why is my compressed file sometimes larger than the original?
This can happen if your original image was already heavily compressed (e.g., a very low-quality JPEG). Re-encoding it at high quality as WebP will be smaller, but at very high quality settings it may grow. Try lowering the quality slider.