Why compress images?
Images are usually the heaviest part of a web page. A photo straight from a phone can be 3–8 MB, far more than a website needs. Large images slow pages down, which frustrates visitors, hurts search rankings through Core Web Vitals and uses up mobile data. They also hit size limits on email attachments, job portals, government forms and online marketplaces.
Compression reduces the file size by discarding detail the eye barely notices. At 70–80% quality, most photos look identical to the original but are a fraction of the size. Unlike most online compressors, this tool never uploads your photos: everything happens in your browser, so even private documents and ID scans stay on your device.
How to use the image compressor
- Choose, drag or paste an image.
- Move the quality slider. The compressed preview and new file size update instantly.
- Pick an output format. WebP usually gives the smallest file; JPG works everywhere.
- Optionally set a maximum width. Shrinking a 4000-pixel photo to 1600 pixels often saves more than lowering quality.
- Compare the two previews, then click Download.
How it works
The image is decoded by your browser and redrawn on an HTML canvas at the size you choose. Large reductions are done in several halving steps for sharper results. The canvas is then re-encoded as JPG or WebP at the selected quality. Encoding also strips metadata such as camera details and GPS location, which is good for privacy.
PNG is a lossless format, so it ignores the quality setting. To shrink a PNG photo, convert it to JPG or WebP. Keep PNG for logos, screenshots and graphics with transparency or sharp text.
Recommended settings
| Use | Width | Quality |
|---|---|---|
| Website hero image | 1600–2000 px | 70–80% |
| Blog or product photo | 1000–1200 px | 70–80% |
| Email attachment | 1200–1600 px | 70% |
| Thumbnail | 300–400 px | 60–70% |
More worked examples
Share image: a 216.5 KB PNG banner saved as JPG at 75% quality comes out at about 48.5 KB, roughly 78% smaller, with no visible difference at normal size.
Common mistakes to avoid
- Compressing PNG photos as PNG. PNG is lossless; convert photos to JPG or WebP.
- Re-compressing the same JPG repeatedly. Each save loses detail; start from the original.
- Uploading huge dimensions. Resizing often saves more than lowering quality; try the image resizer.
Sources and methodology
The calculations on this page follow these published standards and references. The code is covered by automated tests against known values.