Image Compressor
Compress JPEG, PNG, and WebP images instantly in your browser — adjust quality and target file size, preview results, and download. 100% private.
Drag and drop an image here
JPEG, PNG, WebP, GIF — up to 50 MB
Why Image Compression Matters
Images account for more than 60% of the average web page's weight. A single unoptimized product photo or blog hero image can easily exceed 5 MB, which translates to a three- to four-second delay on a mid-range mobile connection. Google's Core Web Vitals directly penalise slow Largest Contentful Paint scores, so compressing images is one of the highest-ROI performance tasks any web developer or content creator can do.
Even outside of web performance, compressed images mean cheaper cloud storage, faster email attachments, and smaller backups. A 4 MB phone photo of a conference slide can be compressed to under 200 KB without losing any readable detail — a 95% reduction that costs nothing in perceived quality.
How to Use This Tool
Drag an image onto the drop zone, or click Choose File to select one. The compressor starts working immediately. Two sliders give you fine-grained control:
- Quality (10–100%) — Controls how faithfully the image is re-encoded. 80% is the sweet spot for photographs: invisible to most viewers but roughly half the file size. Drop to 60% for thumbnails and decorative images where pixel-perfect accuracy is not needed.
- Max file size (0.1–10 MB) — Sets an absolute ceiling on the output. The compressor will reduce quality automatically until the file fits under the limit. Useful when you need to meet a specific upload constraint, like a 1 MB avatar limit.
- The side-by-side preview updates in real time so you can see the trade-off before committing. When you're happy, click Download to save the compressed file.
Choosing the Right Settings
For JPEG photographs, 75–85% quality is almost always visually identical to the original. For PNG graphics with transparency, keep quality higher (90%+) because PNG uses lossless compression and quality reduction mainly comes from dimensional rescaling. For WebP, 70% quality often matches JPEG at 90% thanks to the more modern codec — WebP is worth choosing when broad browser support is available (all major browsers since 2020).
Common Use Cases
- Optimising product images before uploading to an e-commerce platform
- Reducing blog post hero images to hit a 100-score on PageSpeed Insights
- Compressing screenshots and design exports before sharing in Slack or email
- Shrinking phone photos to meet email or form attachment size limits
- Batch-prepping images for a static site without needing a build step
Privacy
This tool runs entirely in your browser. Your images are decoded, compressed, and downloaded
locally — nothing is ever sent to a server. The compression engine is the open-source
browser-image-compression library, which uses the browser's native
OffscreenCanvas and Web Worker APIs. You can disconnect from the internet after
the page loads and the tool will still work.
Frequently Asked Questions
How does browser-based image compression work?↓
This tool uses the browser's built-in canvas and image decoding APIs — via the browser-image-compression library — to re-encode your image at a lower quality or with a reduced maximum file size. For JPEG and WebP, quality directly controls the lossy compression ratio. For PNG, the tool can reduce dimensions or remove unnecessary metadata. The result is a smaller file that is visually similar to the original.
Will compressing my image reduce its visual quality?↓
It depends on how aggressively you compress. At 80–90% quality, the difference is usually invisible to the naked eye. Dropping below 60% will introduce visible artifacts, particularly around sharp edges and text. The side-by-side preview in this tool lets you judge quality before downloading. Start at 80% and lower only if you need a smaller file size.
What is the difference between the Quality slider and the Max Size slider?↓
Quality sets the target encoding fidelity as a percentage — higher means better detail but larger files. Max Size sets a hard ceiling on the output file size in megabytes; the compressor will automatically reduce quality further if needed to hit the target. For most web images, set Max Size to 0.5–1 MB and Quality to 80% to get a good balance.
Does this tool upload my images to a server?↓
No. Everything happens inside your browser using the Web APIs and a JavaScript library. Your images are never sent over the network. You can even use this tool after the page has loaded while offline.
What image formats are supported?↓
JPEG, PNG, and WebP are fully supported. GIF files can be processed but only the first frame will be compressed (the animation is not preserved). AVIF and HEIC support depends on your browser.