Compress an image in the browser
Drop a photo or screenshot here and you get a smaller copy back in the same format. The compress image tool runs on your own machine. The file is never uploaded, and the result appears as soon as the encoder finishes.
The tool accepts PNG, JPG, WebP, AVIF, HEIC, and GIF. Each format has its own encoder: mozjpeg for JPG, oxipng for PNG, libwebp for WebP, and the AV1 encoder for AVIF. These are the same libraries that desktop apps and build pipelines use, compiled to WebAssembly so they can run in a tab. The output keeps the original format, with one exception. HEIC photos from an iPhone come out as JPG, because the browser can decode HEIC through libheif but has no way to encode it.
What the quality setting does
There is one option, quality, on a scale from 1 to 100. It defaults to 80.
For JPG, WebP, and AVIF, quality is lossy. The encoder discards detail the eye is unlikely to notice, and a lower number discards more. At 80 most photos look unchanged at normal viewing size and the file shrinks by a large fraction. For images that only need to look right as a thumbnail or in a chat, 60 to 70 is enough. For product shots, screenshots with small text, or anything that will be zoomed in, stay at 85 to 90.
PNG works differently. oxipng is a lossless optimizer. It tries other filters and compression strategies to find a smaller encoding of the exact same pixels, so the output is pixel-identical to the input no matter what quality you pick. The savings depend on how wasteful the original encoder was. A screenshot saved by a design app can shrink a lot. A PNG that was already optimized may barely move.
If a PNG is still too large after compression, the problem is usually that PNG is the wrong format for a photo. The convert image tool can turn it into WebP or AVIF, which handle photographic content far better at the same visible quality.
When to pick a different tool
Compression keeps the pixel dimensions. If an image is 4000 pixels wide and only needs to be 1200, resizing cuts more bytes than any quality setting can. Use resize image first, then compress the result if it is still too big.
To change the format and shrink at the same time, for example to turn a HEIC into a WebP, go to convert image. It has the same quality option and a format picker.
If you have a set of scans or screenshots that should become one document, images to PDF puts each one on its own page.
Checking the result
Each output file is named after the input with "-compressed" added before the extension, so "photo.jpg" becomes "photo-compressed.jpg". The original is untouched. Open both side by side at full size before you delete anything. If the compressed copy shows blocky edges or color banding, run the original again with a higher quality number. If it looks the same and the size barely dropped, the file was already well compressed and resizing is the next thing to try.
Frequently asked questions
Does compressing change the image format?
No. A JPG stays a JPG, a PNG stays a PNG, and so on. The one exception is HEIC, which comes out as JPG because browsers cannot encode HEIC.
What quality number should I use?
The default of 80 suits most photos. Go down to 60 or 70 for thumbnails and chat images, and up to 90 if you can see artifacts around text or flat color.
Why is my PNG barely smaller?
PNG compression is lossless, so the tool can only remove wasted bytes, not detail. If you need a much smaller file, turn the PNG into WebP or AVIF with the convert image tool instead.
Can I compress several images at once?
Yes. Drop as many as you like. Each one becomes its own job with the same quality setting and downloads on its own.
What happens to transparency?
PNG, WebP, and AVIF keep their transparent areas. JPG has no transparency to begin with, so nothing changes there.
Does the original file get overwritten?
No. The output is a new file named with '-compressed' before the extension, and the original stays as it was.