Skip to content
codinganthem
All tools/Image Compressor

Image Compressor

Compress JPG, PNG, and WebP images online with a quality slider and before/after size comparison. Free, private, and 100% browser-based — no upload to a server.

Drop an image here or click to upload

PNG, JPG, WebP, GIF · max 10 MB · outputs WebP or JPEG

Choose file

How the compression works

Upload a JPG, PNG, WebP or GIF, choose a quality and an output format, and compare the before and after sizes. The image is re-encoded in your browser with the Canvas API, so it never leaves your device. If the re-encoded file would be larger than the original, the tool steps the quality down, and keeps the original if it still can't shrink it.

Which format to choose

  • JPEG: best for photos. Quality around 70–85% usually looks the same as the original at a fraction of the size.
  • WebP: usually 25–35% smaller than JPEG at similar quality and supports transparency; every current browser displays it.
  • PNG: lossless, so it suits screenshots, diagrams and images with text or sharp edges. It's usually larger for photos.

Things to know

  • JPEG can't store transparency, so transparent areas are filled with white. Choose PNG or WebP to keep transparency.
  • Animated GIFs are converted from their first frame only.
  • Re-encoding removes metadata such as camera details and GPS location, which is good for privacy when sharing photos.
  • Compressing an already compressed JPEG again saves little and can add artefacts; start from the original where possible.

Resize first for the biggest saving

A 4000-pixel-wide photo shown 800 pixels wide on a website wastes most of its bytes. Resize to the display size (or twice that for sharp high-density screens) with the Image Resizer, then compress. For tiny icons, an inline data URL from Image to Base64 can save a request.

Frequently asked questions

Are my images uploaded?+

No. Compression runs in your browser with the Canvas API, so images stay on your device.

What quality setting should I use?+

For photos, 70–85% is a good range: noticeably smaller files with no visible difference at normal viewing size.

Why did my PNG get bigger?+

PNG is lossless, so photos saved as PNG are often large. Convert photos to JPEG or WebP; keep PNG for screenshots and graphics.

Does compression remove EXIF and GPS data?+

Yes. Re-encoding the image through the canvas drops metadata, including camera details and location.