Pick the wrong format and you'll either end up with a 3 MB file where 300 KB would have worked, or you'll lose quality you can't get back. The choice between JPG, PNG, and WebP comes down to one question first: does your image need to be exact, or just look good?
The fundamental divide: lossy vs lossless
Every image format either preserves data exactly or throws some of it away. Understanding this is more useful than memorising format names.
Lossless formats (PNG, lossless WebP) shrink files by finding and removing mathematical redundancy — repeated patterns, runs of identical colour. Every pixel in the decoded output is identical to the original. You can save and re-open a lossless file a thousand times and never lose anything.
Lossy formats (JPEG, lossy WebP) discard detail that most people won't notice — high-frequency variations in colour and tone — and can achieve far smaller files than lossless can. But once that data is gone, it's gone. Re-exporting an already-compressed JPEG as another JPEG compounds the loss; you'll accumulate artefacts with each re-save.
JPEG — the workhorse
JPEG has been around since 1992 and is still the most widely supported image format on the web. It works by transforming image data into frequency components (via a DCT transform) and then throwing away the less perceptible ones. The result compresses very well for photographs — images with complex, varied colour and tone.
A typical full-resolution photo from a modern smartphone camera (12–50 MP) will be 5–25 MB as an uncompressed TIFF. The same image as a JPEG at 80% quality is usually 2–6 MB, and at 1920px wide it might be 300–800 KB — depending on content complexity.
JPEG's weaknesses are equally well-known. It doesn't support transparency — transparent areas become opaque white or whatever background colour you fill the canvas with. And it introduces blocky artefacts around high-contrast edges (called "ringing") when quality is set too low, which is particularly visible on text and line art.
Choose JPEG for: photographs, images with lots of colour variation, situations where you need the broadest possible compatibility.
PNG — for when accuracy matters
PNG (1995) uses a lossless compression algorithm (DEFLATE). Every pixel is preserved exactly. The trade-off is file size: a typical photo stored as PNG is 2–5 times larger than the equivalent JPEG — sometimes more.
Where PNG shines is anywhere you need sharp edges, flat colours, or transparency:
- Logos and icons with transparent backgrounds
- Screenshots of interfaces (text renders crisply, no JPEG ringing)
- Illustrations and graphics with large areas of flat colour
- Images used as assets in design or print workflows where you'll re-export later
PNG also supports 8-bit (PNG-8, 256 colours, smaller) and 24/32-bit (PNG-24/32, full colour + alpha). Most tools default to PNG-24/32. If your image has very few colours and transparency, PNG-8 can be significantly smaller.
One thing PNG cannot do: animation. That's GIF's territory, though animated WebP and APNG are better options if you need it.
WebP — the modern choice
Google released WebP in 2010. It supports both lossy and lossless compression, plus transparency in both modes. It's not a replacement for one format — it's a replacement for both.
The numbers are compelling. According to Google's own benchmarks and independent studies:
- Lossy WebP is 25–34% smaller than JPEG at equivalent perceived quality
- Lossless WebP is ~26% smaller than PNG
Browser support is now effectively universal — around 98% global coverage as of 2025, with the only holdouts being Internet Explorer and some old Safari versions. If you're building anything for a modern audience, WebP is safe.
The main practical downside: not every tool or platform accepts WebP uploads. Some older CMSes, email clients, and image editors don't handle it. If you're sending images to someone who might open them in Windows Photo Viewer from 2012, stick with JPEG or PNG.
Format comparison at a glance
| Feature | JPEG | PNG | WebP |
|---|---|---|---|
| Compression type | Lossy | Lossless | Lossy & lossless |
| Transparency (alpha) | No | Yes | Yes |
| Best for | Photos | Graphics, logos, text | Both |
| File size (photo) | Small | Large | Smallest |
| File size (flat graphic) | Large + artefacts | Small–medium | Smallest |
| Browser support | Universal | Universal | ~98% (2025) |
| Tool/platform support | Excellent | Excellent | Good, growing |
Quick decision guide
GIF supports animation but is limited to 256 colours and produces large files by modern standards. For animation, use animated WebP or video instead. For static images, any of the three formats above will be smaller and better quality.
For more on getting the most out of compression once you've picked a format, see how to compress images without losing visible quality. And if your images are going on a website, image formats and page speed covers the performance angle.
Convert between JPG, PNG, and WebP in your browser. No upload, no account.