Image Compressor (JPEG, PNG, WebP)

Compress JPEG, PNG and WebP images in your browser. Adjust quality, cap dimensions, reduce PNG colors and see the exact percentage saved.

Drop an image here or click to choose one
You can also paste an image from the clipboard (Ctrl+V / ⌘V)

Runs entirely in your browser. Your data is never uploaded.

What is Image Compressor?

The Image Compressor re-encodes a photo or graphic to make the file smaller. You choose lossy JPEG or WebP with a quality slider, a reduced-color PNG (palette quantization, similar to TinyPNG) that keeps transparency, or a lossless PNG re-encode, and you can optionally limit the maximum width and height. The tool shows the original and new size and the percentage saved, and warns you when the result is not smaller.

How to use Image Compressor

  1. Drop an image on the upload area, click it to choose a file, or paste an image with Ctrl+V.
  2. Pick the Output format: JPEG, WebP, PNG with reduced colors, or lossless PNG.
  3. Adjust Quality (JPEG/WebP) or Maximum number of colors (reduced-color PNG), and optionally set Max width / Max height.
  4. Check the preview and the size change badge (for example “120 KB → 38 KB, 68% smaller”).
  5. Click the download button to save the compressed file, named like photo-compressed.jpg.

Example

Input
300×200 PNG photo with noise (107 KB), output format WebP, quality 75
Output
WebP file of the same 300×200 size; the size badge shows the new size and a “% smaller” value

The exact percentage depends on the image content and the browser’s encoder.

When to use Image Compressor

Use it before uploading photos to a website, CMS, email or chat when file size matters, or to shrink screenshots and logos while keeping transparency. It is not a batch optimizer and does not run advanced encoders such as MozJPEG or oxipng, so a dedicated build-time tool may squeeze out a few extra percent. Do not recompress an already heavily compressed JPEG repeatedly: every lossy pass loses detail.

How Image Compressor works

The image is decoded by the browser (EXIF orientation is applied) and drawn onto a canvas. If you set a maximum size it is downscaled in halving steps with high-quality smoothing. JPEG and WebP are produced with canvas.toBlob(type, quality); transparent pixels become white for JPEG because the format has no alpha channel. The reduced-color PNG mode quantizes the RGBA pixels to at most 256 colors with the PnnQuant algorithm from the gifenc library, then writes an 8-bit indexed PNG (PLTE + tRNS chunks, compressed with the browser’s CompressionStream). Lossless PNG is simply re-encoded by the browser, which rarely saves much.

Common Use Cases

  • Shrinking phone photos before attaching them to an email or form with an upload limit.
  • Converting large PNG screenshots to a 256-color PNG that is several times smaller.
  • Producing WebP versions of hero images for faster page loads.
  • Capping product photos at 1600 px wide for an online shop.

Security Note

Images are decoded, processed and encoded locally in your browser with the Canvas API. Nothing is uploaded to a server. Because metadata is not copied, compressing is also an easy way to strip location data from photos before sharing.

FAQs

Which format gives the smallest file?

For photos, WebP is usually smallest, followed by JPEG. For screenshots, logos and flat graphics, PNG with reduced colors often beats both and keeps sharp edges and transparency.

Why is my compressed file larger than the original?

The original may already be well optimized, or you chose a lossless format or a very high quality. The tool shows a warning in that case; lower the quality, pick another format or keep the original.

Does compression remove EXIF metadata?

Yes. The output is re-encoded from a canvas, so camera metadata such as GPS location, date and camera model is not copied to the new file.

Is there a size limit?

Very large images are scaled down to fit the browser’s canvas limit (about 16.7 megapixels on Safari, 50 megapixels elsewhere) and a notice tells you the new size.

Good next steps

Explore more categories