Guide

JPG, PNG or WebP: which one to choose

There is no format that beats the others: there is a right format for each destination. Here is the short rule and the reasons behind it.

Choosing an image format looks like a technical decision and is really a decision about destination: there is no “best format”, there is the right format for what you are about to do with that image. This guide gets straight to the four you will actually meet.

The three-second rule

  • Is it a photograph heading for a screen? → WebP, or JPG if you need universal compatibility.
  • Does it have transparency, or is it text, icons or crisp lines? → PNG.
  • Did it come from an iPhone and you need to send it to someone? → convert to JPG.
  • Is it going to a print shop? → high-quality JPG, or TIFF if they ask for it.

JPG: the one everybody opens

Born in 1992, JPG compresses lossily: it discards information irreversibly to save space. It is remarkably good with photographs, where smooth gradients hide the loss well, and rather bad with text and crisp edges, where it produces halos and dirt around letters.

Its two important limits: no transparency, and every time you open a JPG, edit it and save it again you lose a bit more. Saving the same JPG twenty times degrades it visibly. Always work from the original.

Use it for: photos you send to people, email attachments, print shops, forms, anywhere you do not know what software is waiting at the other end.

PNG: the one that loses nothing

PNG compresses losslessly: what you save is exactly what you get back, pixel for pixel. It also supports real transparency with 256 levels, which allows soft edges over any background.

The problem is weight. A photograph saved as PNG can take five or ten times what the equivalent JPG does, because lossless compression has nothing to work with when there are millions of distinct colours. With few flat colours, though — a logo, a chart, a screenshot of an interface — PNG is unbeatable and usually lighter than JPG at far better quality.

Use it for: logos, icons, screenshots, charts, anything with transparency, and anything with text that has to read crisply.

WebP: today's web standard

Created by Google, WebP does both: lossy like JPG (but 25–35% lighter at the same perceived quality) and lossless like PNG (20–26% lighter), plus transparency and animation. On paper it wins everywhere.

Its only weak point is the world outside the browser: every current browser displays it without fuss, but plenty of desktop software and some services still refuse it. Hence it is the obvious choice to publish on a website and a poor choice to send to someone.

Use it for: every image on your website. Do not use it for: emailing, attaching to a document or sending to print.

HEIC: the iPhone one

This is how your iPhone has saved photos since 2017. It compresses even better than WebP and stores extra information (depth, bursts, reversible edits), but drags along patent licensing that has slowed its adoption outside Apple. In practice: excellent for storing on the phone, useless for sharing. We go deeper in the dedicated HEIC guide.

AVIF, the one coming next

AVIF compresses even better than WebP (another 20% or more) and every modern browser can read it today. The detail that matters: most browsers still cannot write it, so a tool that runs inside the browser cannot offer it reliably. When that piece arrives, it will be WebP's natural successor.

Summary table

JPGPNGWebPHEIC
TransparencyNoYesYesYes
LosslessNoYesOptionalOptional
AnimationNoNo (APNG yes)YesYes
Relative size (photo)100%500%70%50%
Opens everywhereYesYesBrowsersApple

The most common mistake

Saving photographs as PNG “so they do not lose quality”. The result is a file ten times heavier that nobody could tell apart from a JPG at quality 85. The quality lost in a well-configured JPG is the quality the eye cannot see; the weight gained by an unnecessary PNG is weight the web definitely notices. When in doubt, convert and compare the two file sizes: the decision makes itself.

Frequently asked questions

Which is lighter, JPG or PNG?

For photographs, JPG by a huge margin (up to ten times lighter). For logos, icons and screenshots with few flat colours, PNG is usually lighter and looks better too.

Can I use WebP everywhere?

In browsers, yes: every current one displays it. Outside the browser, not always: plenty of desktop software and some services still refuse it. To send files to someone, JPG remains the safe bet.

Is AVIF worth it?

It compresses better than WebP and every modern browser reads it, but most cannot create it, so tools that run inside the browser cannot offer it reliably yet.