How to compress an image
- Drop a JPG, PNG, WebP, AVIF or GIF into the box above, choose a file, or paste one.
- Keep the format, or switch to WebP or JPEG for a much smaller file.
- Move the quality slider until the size and look are right. The preview updates as you go.
- 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?
| Format | Best for | Transparency |
|---|---|---|
| WebP | Websites and online stores. Usually 25–35% smaller than JPEG at the same quality. | Yes |
| JPEG | Photos that must open anywhere, including email and older marketplaces. | No (filled with white) |
| PNG | Screenshots, 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
- How 75 tools stay under 40 KB of JavaScript. Image codecs weigh hundreds of kilobytes, yet no tool page ships more than 32 KB of JavaScript up front. The budgets, the build checks and the parts that were hard.