← Back to Tools
🗜️

Image Compressor

Reduce image file size without quality loss

Loading tool...

Quick start: compress your first image

  1. Upload — Drop PNG, JPEG, or WebP files into the drop zone. Batch mode supported.
  2. Set quality — Start at the default 80%. For photos, 75–85% is the sweet spot where compression is invisible to most viewers. For screenshots with text or UI elements, stay above 85% to keep text crisp.
  3. Compare and download — Each result shows the before/after file size. Download individually or grab all as a ZIP.

How the compression works technically

The compressor uses the browser's native Canvas API to re-encode images at a controlled quality level.

For JPEG and WebP: When you call canvas.toDataURL('image/jpeg', 0.8), the browser's built-in encoder applies DCT (Discrete Cosine Transform) quantization — the same mathematical step used by Photoshop's "Save for Web" and FFMPEG's libx264. Higher quantization = more data discarded = smaller file but lower quality. At 80%, the change is essentially invisible to human vision because the discarded information falls mostly in high-frequency spatial bands the eye cannot resolve at normal viewing distances.

For PNG: There are no pixels to discard. Instead, the tool strips embedded metadata: EXIF camera data, GPS coordinates, ICC colour profiles, and comment blocks. A typical camera JPEG can carry 30–120 KB of metadata — removing it is entirely lossless.

Impact on Core Web Vitals

Google's Largest Contentful Paint (LCP) is directly affected by image weight. If your hero image is 1.2 MB and you compress it to 180 KB, the browser downloads it ~6× faster on a mobile connection — and your LCP improves by roughly the same factor. This is the single highest-impact optimisation most websites can make without any code changes.

Format comparison: which to choose

FormatBest forTransparencyTypical compression ratio
JPEGPhotos, complex scenesNo70–90% reduction at q=80
WebPWeb images, photos + graphicsYes25–35% smaller than JPEG at same quality
PNGLogos, UI screenshots, textYesLossless only — metadata strip saves 5–30%

FAQs about Image Compressor

Everything you might be wondering — answered.

What is the technical difference between lossy and lossless compression here?+
For JPEG and WebP, the tool adjusts the Canvas toDataURL quality parameter (0–1 scale), which maps to the DCT quantization strength — fewer bits are allocated to high-frequency details (fine textures, sharp edges at low contrast). For PNG, no pixel data changes; only embedded metadata chunks (EXIF, XMP, comment blocks) are stripped.
Which formats are supported?+
PNG, JPEG/JPG, and WebP. GIF is not currently supported because animated GIF frames require a different processing approach.
Can I batch compress many files at once?+
Yes — drop as many files as you like. The tool queues them and processes each sequentially using the same quality setting.
Are my photos stored or logged anywhere?+
No. The Canvas API reads the image into browser memory, re-encodes it at the target quality, and generates the output blob locally. Nothing is transmitted to our servers.