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.
How much smaller, in practice
Percentages are easy to forget, so here is the same photograph — a 12-megapixel landscape shot — saved five ways at a 1920px display width. The exact numbers vary with image content, but the ratios between formats are remarkably consistent from photo to photo:
| Format & setting | Typical size | vs JPEG 90 |
|---|---|---|
| PNG-24 (lossless) | 3.9 MB | ~5× larger |
| JPEG, quality 90 | 720 KB | baseline |
| JPEG, quality 80 | 430 KB | 40% smaller |
| WebP, quality 80 | 300 KB | ~58% smaller |
| WebP lossless | 2.9 MB | still large |
Two lessons fall out of this. First, lossless formats are the wrong tool for photographs — they faithfully preserve sensor noise you can't see and pay for it in megabytes. Second, for a photo the choice of lossy format matters less than using a lossy format at all: the jump from PNG down to any lossy option is enormous, and WebP simply trims the last third off JPEG. For a flat graphic the table would look completely different — there PNG and lossless WebP win comfortably, because there is no photographic noise to store and the DEFLATE-style compression finds long runs of identical colour.
A word on colour and metadata
Format also decides what travels with the image beyond the pixels. JPEG and WebP both carry EXIF metadata — camera model, timestamp, and often GPS coordinates — unless a tool strips it. PNG can carry text chunks and colour profiles. If you are publishing photos and would rather not broadcast where they were taken, prefer a workflow that drops metadata on export. Colour is the other subtlety: all three formats can embed an ICC colour profile, but if you strip the profile from a wide-gamut photo it may look duller in some browsers. For ordinary sRGB photos this never matters; for print-destined or professional work it does.
Checking browser support before you commit
Format support shifts over time, and "will this open for my visitors?" is answerable with real data rather than guesswork. The community-maintained Can I Use compatibility tables track exactly which browser versions support WebP, AVIF, and every other format, weighted by real-world usage share. Before standardising on a newer format for a public site it is worth a thirty-second check there — and if you support a known-old audience (some enterprise and government environments still run dated browsers), it will tell you whether keeping a JPEG or PNG fallback is still worthwhile. For a deeper look at WebP's successor, see our guide to WebP and AVIF.
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.