Image Compressor

Compress JPG, PNG, and WebP images in your browser. Files never leave your device.


How Does Browser-Side Image Compression Work?

This tool uses the HTML5 Canvas API to compress images entirely in your browser. The original image is drawn onto a canvas element at its native resolution, then exported with the specified quality and format using canvas.toBlob(). No data is ever sent to a server — your files stay private on your device.

Choosing the Right Format

  • JPEG — Best for photographs and images with gradients. Lossy compression removes fine detail to reduce file size. Quality 70–85% is a good balance for web use.
  • WebP — Google's modern format. Typically 25–35% smaller than JPEG at equivalent quality. Supported by all modern browsers. Best choice for web images in 2024.
  • PNG — Lossless compression. Good for screenshots, logos, and images with text or sharp edges. Quality slider has no effect on PNG — all information is preserved.

Quality Setting Guide

The quality slider (10–100%) controls how much lossy compression is applied for JPEG and WebP output:

  • 90–100% — Near-original quality, minimal size reduction. Good for archival or print use.
  • 70–89% — Excellent quality, significant size reduction. Recommended for most web images.
  • 50–69% — Noticeable but acceptable compression artifacts. Good for thumbnails and previews.
  • Below 50% — Heavy compression artifacts. Suitable only for very small thumbnails or low-bandwidth situations.

Frequently Asked Questions

Is my image uploaded to a server?

No. This tool processes everything locally in your browser using the Canvas API. Your images never leave your computer, which is especially important for sensitive or private photos.

Why is the compressed file sometimes larger?

Converting a WebP or PNG image to JPEG at very high quality can produce a larger file than the original if the original was already well-optimized. Try reducing quality or keeping the original format. Also note that converting a JPEG to PNG always produces a larger file because PNG is lossless.

Does this preserve image metadata (EXIF)?

No. The Canvas API strips EXIF metadata (GPS location, camera settings, dates) from images. This is actually a privacy benefit for images you plan to share publicly, but if you need to preserve metadata you should use a dedicated tool.