Docutoolbox

Image compressor

Shrink a JPG or PNG's file size with a live quality slider, and see the before/after side by side.

🖼️
Drop an image here, or click to browse
JPG or PNG · Max 25MB
Original image
Original
-
Compressed image
Compressed
-
Your image is processed entirely in your browser - nothing is uploaded to a server.

What is the Image Compressor?

The Image Compressor reduces a JPG or PNG's file size by adjusting its compression quality, with a live before-and-after preview so you can find the sweet spot between file size and visual quality before downloading. It's built for anyone who needs a smaller file for a website, an email attachment, or a form upload with a size limit.

Everything happens locally in your browser using the Canvas API. Your image is never uploaded to a server, so it's fast and private, with no file size charged against a quota.

How to use it

  1. Drop your image onto the upload area, or click it to browse your device.
  2. Drag the quality slider to adjust the compression level.
  3. Watch the original and compressed previews update live, side by side, along with each one's exact file size.
  4. Once you're happy with the balance of size and quality, click Download.

How the quality slider works

Lowering the quality setting increases compression, shrinking the file size further but introducing more visible artifacts, especially in areas with fine detail or sharp edges. Raising the quality setting keeps more visual detail but results in a larger file. Because the preview updates live as you drag the slider, you can find the lowest quality setting that still looks acceptable for your use case, rather than guessing.

JPG vs. PNG compression

JPG compression is lossy and works especially well on photos, where small color variations are hard for the eye to notice even at fairly aggressive compression levels. PNG compression in this tool works similarly, re-encoding at your chosen quality level, though PNG is more commonly used for graphics, screenshots, and images that need sharp edges or transparency, where very aggressive compression is more likely to show visible artifacts.

How it works technically

The tool loads your image into an in-browser canvas, then uses the browser's built-in image encoder to re-export it at your chosen quality level. This is the same compression technology used by professional image editing software, running directly on your device instead of a remote server.

Common uses

  • Shrinking a photo so it fits under a website's or form's upload size limit
  • Reducing image sizes to speed up how quickly a webpage loads
  • Making an email attachment small enough to send without hitting a size cap
  • Saving storage space for large batches of photos
  • Preparing images for a portfolio or gallery where fast loading matters

Frequently asked questions

How much smaller will my file get?

It depends heavily on the original image and the quality level you choose, but many photos can shrink by 50 to 80 percent at a quality setting that still looks very close to the original.

Will compression change the image's dimensions?

No, this tool only changes the file's compression level, not its pixel dimensions. To also resize the image, use the Image Resizer tool.

Does compressing lose quality permanently?

Yes, JPG and aggressive PNG compression are lossy processes, meaning some image detail is discarded and can't be recovered. Keep your original file if you might need full quality again later.

Can I compress a PNG with transparency?

Yes, transparent areas are preserved through compression, since the transparency channel is kept intact during re-encoding.