How image compression works
A digital photo is a grid of coloured dots called pixels. A 12-megapixel phone photo has about 12 million of them, and stored raw it would take around 36 MB. Image formats shrink that in two ways:
- Lossy compression (JPG, WebP, AVIF) throws away detail your eyes are unlikely to notice, such as tiny colour changes in a blue sky. The quality number decides how much is thrown away.
- Lossless compression (PNG) keeps every pixel exactly. It can only pack the data more tightly, so savings are smaller.
This tool decodes each image in your browser, then re-encodes it with the same encoders professional tools use: MozJPEG for JPG, Google’s libwebp for WebP, libavif for AVIF and OxiPNG for PNG. Nothing is uploaded. If re-compressing would make a file bigger, you get your original back (with hidden metadata removed) instead.
A worked example with real numbers
We took a 1920 × 1200 landscape photo saved as a 420 KB JPG and compressed it with this tool’s encoders:
| Setting | File size | Saving |
|---|---|---|
| Original JPG | 420 KB | – |
| JPG, quality 92 | 327 KB | 22% |
| JPG, quality 85 | 171 KB | 59% |
| JPG, quality 75 | 93 KB | 78% |
| JPG, quality 60 | 63 KB | 85% |
| WebP, quality 75 | 72 KB | 83% |
| AVIF, quality 75 | 34 KB | 92% |
| Lossless PNG | 1,572 KB | 274% bigger |
At quality 75 the photo looks the same as the original on a laptop screen, yet it is less than a quarter of the size. Halving the dimensions to 960 × 600 as well brings it down to 30 KB as a JPG or 24 KB as a WebP. The last row shows why photos should not be saved as PNG: lossless storage of a photo is huge.
A wider 3840 × 1200 panorama of 1.25 MB dropped to 284 KB at JPG quality 75, a 77% saving.
Choosing a quality setting
- 85–92: for prints, portfolios and photos you will edit again.
- 75–85: the sweet spot for websites, email and social media.
- 60–75: thumbnails, product grids and previews.
- Below 50: only when size matters more than looks. Expect visible blocks around edges and text.
Always check the result with the before/after slider. Use Zoom 100% to look at faces, fine text and smooth gradients like skies, where compression shows first.
Which format should you pick?
| Format | Best for | Notes |
|---|---|---|
| JPG | Photos that must open everywhere | Every device and app supports it |
| WebP | Photos and graphics on websites | Supported by all current browsers; usually smaller than JPG |
| AVIF | The smallest possible web images | Slower to create; supported by current Chrome, Edge, Firefox and Safari |
| PNG | Logos, icons, screenshots, transparency | Lossless; poor choice for photos |
The quality slider means the same thing in every format: AVIF uses its own internal scale, and the tool converts your setting so that 75 looks roughly comparable whichever format you choose.
If you keep PNG files as PNG, they are optimised losslessly, so they look exactly the same. Expect savings of 5–40%. When the tool spots a PNG that is really a photo, it suggests WebP, which is usually 70–90% smaller. You can also convert screenshots to JPG with PNG to JPG when transparency is not needed.
Tips for the smallest files
- Resize before you compress. A phone photo is often 4000 pixels wide, but a website rarely shows images wider than 1600–2000 pixels. Set a maximum width here, or use Resize Image for exact sizes.
- Do not compress the same JPG again and again. Each lossy save loses a little more detail. Keep your original and compress a copy.
- Need an exact limit? Job portals and exam forms often demand “under 100 KB”. Compress to KB finds the best quality that fits automatically.
- Sending photos as one document? Combine them with JPG to PDF.
Filling in an online form with a strict limit, such as 50 KB or 100 KB? Our guide on how to reduce image size in KB shows how to reach an exact size while keeping the photo clear.
Privacy and metadata
Photos from phones carry hidden EXIF data: the date and time, camera model and often the exact GPS location where the picture was taken. By default this tool removes it, which protects your privacy and saves a few kilobytes. Tick Keep photo info if you need the date and camera details in your JPG files, for example for a photo archive. Rotation is applied to the pixels, so photos always appear the right way up.