🖼️ Image & File

Image Compressor

Reduce image file size with adjustable quality, resize, and format conversion. Side-by-side comparison — nothing uploaded, all in your browser.

🗜️

Click to upload or drag & drop an image

JPG, PNG, or WebP — any size your browser can handle

75%

Applies to JPEG & WebP output. PNG is lossless.

How it works

The image is loaded into your browser and drawn onto a hidden HTML Canvas. The Canvas API's toDataURL() method re-encodes the image using the browser's built-in JPEG or WebP encoder at the quality level you specify. If you set max width/height, the image is resized before encoding. The compressed result is shown alongside the original for comparison. Nothing is uploaded — all processing happens in your browser.

Frequently Asked Questions

What image formats are supported?
This tool accepts JPG, PNG, and WebP images. You can output compressed files in JPEG, WebP, or PNG format. The input and output formats are independent — you can convert a PNG to WebP, or a WebP to JPEG, for example.
Is JPEG or WebP better for compression?
WebP generally produces files 25-35% smaller than JPEG at equivalent visual quality. JPEG has broader compatibility with older software and devices, while WebP is supported by all modern browsers (Chrome, Firefox, Safari, Edge). For maximum compression on the web, use WebP. For email or print compatibility, use JPEG.
What is the difference between lossy and lossless compression?
Lossy compression (JPEG, WebP at quality < 100%) discards some image data that the human eye is less likely to notice, achieving much smaller file sizes. Lossless compression (PNG, or JPEG/WebP at 100% quality) preserves every original pixel but results in larger files. For photographs and natural images, lossy is usually fine. For screenshots, graphics with text, or images requiring pixel-perfect accuracy, use lossless PNG.
When should I compress images?
Compress images before uploading to websites to improve page load speed — Google uses Core Web Vitals as a ranking factor. Good targets: hero images under 200 KB, content images under 100 KB, thumbnails under 30 KB. Compressing before sharing via email or messaging also saves bandwidth and reduces send times.
How accurate is browser-based compression?
Browser-based compression uses the Canvas API and the browser's built-in JPEG/WebP encoders (libjpeg for Chrome, libwebp for Firefox, etc.). The quality parameter (0-1) maps directly to the encoder's quality setting — results are equivalent to what you'd get from ImageMagick, Sharp, or server-side libraries. The only limitation is that PNG output from canvas.toDataURL is always lossless, so quality settings only apply to JPEG and WebP formats.
Browse all tools Image to PDF Color Picker