Image Compressor
Compress JPEG, PNG, and WebP images with adjustable quality — batch process up to 10 files, all in your browser.
Drag & drop images here, or click "Add Images" above
JPEG, PNG, WebP — up to 10 images
Lossy compression
Best for photos
No transparency
Lossless compression
Supports transparency
Best for graphics
Lossy & lossless
Smallest file size
Modern browser support
90-100 — maximum quality
70-80 — balanced
50-60 — web thumbnails
drawImage() for render
toBlob(type, quality)
Client-side processing
Up to 10 images at once
Individual downloads
Download all as .zip
What is Image Compression?
Image compression reduces the file size of an image by removing redundant data or approximating pixel values. Lossy compression (JPEG, WebP) discards some visual information to achieve smaller files, while lossless compression (PNG) preserves every pixel exactly. This tool uses the browser's Canvas API to re-encode images at your chosen quality level, giving you full control over the size-quality tradeoff.
When to Compress Images
- Web performance: Smaller images load faster, improving Core Web Vitals and user experience. Most websites can reduce image sizes by 40-70% without noticeable quality loss.
- Email attachments: Many email providers limit attachment sizes. Compressing images makes it easier to share photos via email.
- Social media: Platforms re-compress uploads, so pre-compressing gives you more control over the final quality.
- Storage savings: Batch compressing a photo library can free up significant disk space.
- Format conversion: Convert PNG screenshots to JPEG for smaller sizes, or convert JPEG to WebP for modern web delivery.
Format Comparison
| Feature | JPEG | PNG | WebP |
|---|---|---|---|
| Compression | Lossy | Lossless | Both |
| Transparency | No | Yes (alpha) | Yes (alpha) |
| Best for | Photos | Graphics, icons | Web delivery |
| File size | Small | Large | Smallest |
| Browser support | Universal | Universal | Modern browsers |
Frequently Asked Questions
How does the image compressor work?
The tool loads your image onto an HTML Canvas element, then re-encodes it at the quality level you choose using the Canvas API's toBlob() method. For JPEG and WebP, lowering quality reduces file size by increasing lossy compression. PNG output is always lossless. Everything happens in your browser — no images are uploaded to any server.
What image formats are supported?
You can upload JPEG, PNG, and WebP images. The compressor can also convert between these formats — for example, convert a PNG to JPEG for smaller file sizes, or convert a JPEG to WebP for modern browsers. The output format is selectable for each image.
How many images can I compress at once?
You can batch compress up to 10 images at once. Each image shows its own preview with original size, compressed size, and savings percentage. You can download images individually or all at once as a zip file.
Is my image data sent to a server?
No. All compression and format conversion happens entirely in your browser using the Canvas API and JavaScript. Your images never leave your device. No data is uploaded to any server.
What quality setting should I use?
For most use cases, a quality of 70-80 provides a good balance between file size and visual quality. For web thumbnails, 50-60 works well. For high-quality output, use 85-95. Quality 100 produces the largest file with minimal visual improvement over 90. PNG output ignores the quality setting since PNG is always lossless.
Related Tools
- SVG to PNG Converter — Convert SVG to high-quality PNG with custom dimensions and retina scaling.
- Base64 Encoder Decoder — Encode and decode Base64 strings with file upload and image preview.