Skip to content

Image Compressor (Universal)

Compress a JPG, PNG, WebP or AVIF with a quality slider and see the before and after size. The format stays the same. Warns when the result is larger.

compress

Drop Image image here

or click to browse files from device

Accepted format: JPG, PNG, WebP, AVIF • Maximum 20 MB

What this tool does

Choose a JPG, PNG, WebP or AVIF, set the compression quality, and the tool re-encodes it in the same format and shows the original size, the new size and the saving.

How to use it

  1. Choose a image file, or drop it on the page.
  2. Set the compression quality with the slider. It starts at 75%.
  3. Press Compress image.
  4. Check the original size, the new size and the saving. If the new file is larger, the page tells you, and you should keep the original.
  5. Press the download button to save the result.

Where it runs

The work happens in your browser, using the canvas feature that every current browser has. The image is not uploaded and nothing is stored on this site’s server.

AVIF is the exception. Browsers can’t write AVIF from a canvas, so for AVIF output the tool sends your file to this site’s server, which encodes it with PHP’s GD library. That only works when the server’s GD build supports AVIF, and the tool shows an error when it doesn’t. The upload sits in a temporary folder just long enough for you to download the result (the link lasts 15 minutes). The server refuses images over 50 megapixels and allows 15 conversions a minute.

Your browser has to be able to open AVIF to read the file. Current Chrome, Edge, Firefox and Safari 16.4 and later can. If yours can’t, the tool reports that it couldn’t read the image.

How compression works here

The image is decoded and saved again at the quality you choose, from 10 to 100. For JPG, WebP and AVIF, a lower value discards more detail and makes a smaller file. PNG is lossless and the browser’s PNG writer has no quality setting, so for PNG files the tool only re-encodes, and the saving is small or nil. The output keeps the input’s format; to change format use the Quality & Format Converter.

How to get good results

  1. Resize first. An image 4,000 pixels wide shown at 800 pixels wastes most of its bytes. The Image Resizer gives bigger savings than any quality setting.
  2. Pick the right format. Photos suit JPG, WebP or AVIF. Flat graphics and transparency suit PNG or WebP.
  3. Start around 75 for photos and look at the result at full size. Lower it until you notice the difference, then step back up.

Transparent areas stay transparent in PNG, WebP and AVIF output. A JPG has none to keep.

Limits

  • Metadata such as EXIF, location and colour profiles is not carried over.
  • Browsers apply EXIF rotation when they open a photo, so it normally comes out the right way up.
  • The page states a 20 MB maximum but doesn’t check it in the browser. Very large images depend on your device’s memory.
  • Only one image is handled per run.

On a WordPress site this fits into a wider speed plan: see the guide to speeding up WordPress.

How much smaller will my image get?

It depends on the image and the setting. Photos often shrink a lot. Already optimised images may not shrink, or may grow.

Why is my compressed PNG barely smaller?

PNG is lossless and has no quality setting in the browser, so the tool can only re-encode it. For a big saving, convert to WebP or JPG.

Does it keep EXIF and location data?

No. Metadata is not copied to the new file.

Can it change the output format?

No. The output keeps the input’s format. Use the Quality & Format Converter to change it.

Is my image uploaded?

JPG, PNG and WebP are processed in your browser and not uploaded. An AVIF is the exception: it is encoded on the server, so the file is uploaded temporarily.