Image Compressor
Compress images by adjusting quality in your browser. Supports JPG and WebP output. See before/after file size instantly. No upload — files stay on your device.
Drop an image here or click to browse
PNG · JPG · WebP · GIF · BMP
Related Tools
Base64 → Image
Convert Base64 strings or data URIs back to images instantly. PNG, JPG, WebP, GIF — auto-detects format. No upload required.
Image → Base64
Convert images to Base64 data URIs instantly. Supports PNG, JPG, GIF, WebP, SVG. Files never leave your browser.
Image Compare
Compare two images with a draggable before/after slider in your browser. No upload required.
Image compression reduces the file size of an image by discarding or encoding pixel data more efficiently. There are two fundamental approaches: lossless compression (ZIP, PNG) preserves every pixel exactly but achieves moderate size reduction; lossy compression (JPEG, WebP) discards imperceptible detail to achieve dramatically smaller file sizes, with the quality/size tradeoff controlled by a quality parameter. For typical photographic content, lossy compression at quality 75–85% is visually indistinguishable from the original at normal viewing distances while reducing file size by 60–80%.
Web performance depends heavily on image file sizes. Images typically account for 60–70% of total page weight on content-heavy websites. Google's Core Web Vitals measure Largest Contentful Paint (LCP) — how quickly the main image on a page becomes visible — and image compression directly impacts this metric. A 4MB hero image loading over a mobile connection causes a poor LCP score and high bounce rates; the same image compressed to 200KB loads in under a second.
This tool compresses images in the browser using the Canvas API's toBlob() method with quality control. The uploaded image is drawn onto an offscreen canvas and exported as JPEG or WebP at the selected quality level. Before-and-after file sizes are displayed so users can judge the compression ratio. All processing is local — images never leave the device. JPEG compression is universally compatible; WebP achieves 25–34% better compression than JPEG at the same quality level and is supported by all major browsers.
Common Use Cases
Optimizing website images for Core Web Vitals
Google's PageSpeed Insights and Lighthouse audits flag oversized images as one of the most impactful performance issues. Product photos, blog hero images, and portfolio images often originate from cameras or design tools at 3–10MB and need to be compressed to 100–300KB for web use. Compressing to WebP at quality 80 typically reduces a 5MB photo to under 200KB — a 96% reduction — with no perceptible quality loss at normal screen resolution.
Reducing image file sizes for email attachments
High-resolution photos from smartphones (typically 4–12MB) are too large to attach to emails without approaching attachment limits and creating download delays for recipients. Compressing photos to JPEG at quality 75–80 before attaching produces files under 500KB while preserving sufficient quality for screen viewing. Marketing teams, real estate agents, and event photographers routinely compress images before emailing to clients.
Preparing images for storage quota-constrained platforms
Cloud storage services (Google Drive, Dropbox, iCloud), social media platforms (Instagram, Twitter), and CMS file storage all impose storage limits or file size caps. Compressing a batch of images before upload stays within quota limits and speeds up sync operations. For platforms with file size maximums — some CMSes reject uploads over 2MB — compression to the limit is required before the file can be accepted.
How to Use
- Drop or click the upload area to open a PNG, JPG, or WebP image.
- Select the output format — JPG for photos, WebP for best compression.
- Drag the Quality slider: lower values produce smaller files with more visible compression.
- Compare the Original vs. Compressed file size displayed below the preview.
- Click Download when satisfied. Processing happens entirely in your browser.
Quality Guide
- 90–100% — Near-lossless; minimal compression, largest file
- 75–89% — Excellent for photography; good balance of quality and size
- 60–74% — Good for web images; noticeable compression only at 100% zoom
- Below 60% — Heavy compression; suitable for thumbnails and previews
Why Compress Images?
- Faster page load times and improved Core Web Vitals (LCP)
- Reduced storage and bandwidth costs
- Better SEO rankings — search engines favor fast-loading pages