Skip to content

Compress image

Shrink JPG, PNG and WebP files while keeping them sharp.

Updated

How to compress an image

  1. Drop a JPG, PNG, WebP, AVIF or GIF into the box above, choose a file, or paste one.
  2. Keep the format, or switch to WebP or JPEG for a much smaller file.
  3. Move the quality slider until the size and look are right. The preview updates as you go.
  4. Select Download to save the compressed image.

How it works

Your browser's own decoder reads the image once, turning sideways phone photos upright from their EXIF orientation. The decoded pixels are kept, and every time you move the slider or change format the image is encoded again from those pixels, not from the last result. Trying quality 40, then 80, then 60 gives exactly the file you'd get by choosing 60 first; losses never stack.

Each format has its own encoder, the same WebAssembly builds Google's Squoosh uses:

  • JPEG: MozJPEG, Mozilla's encoder, which typically makes smaller files than a standard JPEG encoder for the same visual quality. The slider sets its quality, 1 to 100. Transparent areas become white.
  • WebP: libwebp, Google's reference encoder, with the slider as its quality.
  • PNG: OxiPNG, a lossless optimiser. Every pixel is kept exactly, so there's no quality setting; it tries different compression filters and keeps the smallest. It may change the colour values hidden under fully transparent pixels, which no one can see.

“Keep format” saves JPEG as JPEG, PNG and GIF as PNG, and WebP and AVIF as WebP, since there's no AVIF encoder here. Only the first frame of an animated GIF is kept. The new file is built from pixels, so EXIF, GPS and camera details are dropped. The exception is when re-encoding in the same format would make the file bigger: then you get your original file back untouched. The encoders download only when you start using the tool, and run in a background thread, so the page itself stays fast.

Which format should I pick?

FormatBest forTransparency
WebPWebsites and online stores. Usually 25–35% smaller than JPEG at the same quality.Yes
JPEGPhotos that must open anywhere, including email and older marketplaces.No (filled with white)
PNGScreenshots, logos and graphics with sharp edges or text.Yes

How much smaller will my image get?

It depends on the image. Photos straight from a phone or camera often shrink by 60–80% at quality 75 with no visible difference. Screenshots and graphics shrink less as JPEG, but converting them to WebP usually helps. If an image is already well optimized, you'll get the original back rather than a bigger file.

Common uses

  • Email attachment too big. Phone photos are often several megabytes each, so a handful can go over a mailbox's attachment limit. Compress each one at quality 75 and they usually look the same at a fraction of the size.
  • A form rejects large photos. Job portals, visa applications and exam sites often cap uploads at a few hundred kilobytes. Lower the quality slider until the new size shown in the result fits the limit, then download.
  • Images slowing down your website. Large images are a common reason pages load slowly, especially on phones. Compress each image before you upload it, and switch the format to WebP for the biggest saving.
  • Heavy slide decks and reports. Screenshots and photos pasted into presentations and documents can make the file huge. Compress them before inserting, and the deck or report gets smaller too.

From the blog

Questions

Which quality setting should I use?

75 is a good default for photos: most people can't tell the difference from the original, and the file is usually 60–80% smaller. Go up to 85–90 for product photos you plan to zoom into, or down to 50–60 for thumbnails.

Why is my PNG only a little smaller?

PNG is lossless, so compression can only repack the same pixels more efficiently. For photos, converting to WebP or JPEG usually cuts the size far more.

Does compressing remove location and camera data?

Yes. The image is re-encoded from its pixels, so EXIF metadata such as GPS location, camera model and capture time is not carried over to the compressed file.

What if compressing makes my image bigger?

Some images are already well compressed. If re-encoding in the same format would make the file larger, you get the original back unchanged. Try a lower quality or WebP instead.

Is there a file size limit?

Files up to 50 MB and 100 megapixels work on most computers. Very large images can run out of memory on phones.

All image tools →