Learn / FormatsJPEG vs. PNG vs. WebP: which should you use?
Three formats, three different jobs. The short version: photos want JPEG or WebP, anything needing transparency or crisp edges wants PNG or WebP, and WebP usually wins outright when you can use it.
This gets asked constantly, and most answers turn it into a checklist that doesn't actually help you decide. The real answer depends on one question: does this image have hard edges and flat colors, or is it a photograph?
JPEG: photos, lossy, no transparency
JPEG compresses by discarding information it estimates you won't notice — most aggressively in high-frequency detail, less in smooth gradients. That trade works well for photographs, which are mostly smooth tonal variation, and badly for graphics with hard edges or text, which is exactly where JPEG's blocky compression artifacts show up. JPEG has no transparency support at all, and re-saving a JPEG repeatedly compounds quality loss each time.
PNG: lossless, real transparency, bigger files
PNG never throws anything away — decode a PNG and you get back exactly the pixels that were encoded, no artifacts. It supports full alpha transparency, which makes it the standard choice for logos, icons, screenshots, and anything that needs to composite over other content. The trade-off is size: a lossless encode of a real photograph is typically much larger than an equivalent JPEG, often for a visual difference most people can't actually see.
A common real mistake: exporting a photo as PNG "for quality" and ending up with a file several times larger than a JPEG at a quality setting that would have looked indistinguishable. Lossless is only worth its cost when you actually need pixel-perfect fidelity — flat graphics, screenshots, anything with text.
WebP: usually the best of both, when you can use it
WebP supports both lossy and lossless compression in one format, plus full alpha transparency — it can do JPEG's job and PNG's job, generally more efficiently than either. Lossy WebP typically beats JPEG at a given visual quality; lossless WebP typically beats PNG on file size too. The catch used to be browser support; today that's a non-issue for essentially all modern browsers.
If you're not sure which to pick and don't have a specific compatibility constraint, WebP is the reasonable default for web delivery today — which is why it's the pre-selected format in Headroom's own
Convert and
Optimize tools.
A practical way to decide
- Photograph, no transparency needed: WebP (lossy) if you can use it, JPEG otherwise.
- Logo, icon, screenshot, or anything needing transparency: WebP (lossless) if you can use it, PNG otherwise.
- Sending to a pipeline or tool with unknown/limited format support: JPEG for photos, PNG for anything needing transparency — the two formats you can assume almost anything will open correctly.
None of this requires guessing — Convert will re-encode a real file into any of the three so you can compare actual output size directly, and Optimize adds resizing and quality control on top for cutting size down further without a visible quality hit.
Questions people actually ask
Which format gives the smallest file size?
For photographic content, WebP typically produces meaningfully smaller files than JPEG at similar visual quality — often 25–35% smaller in practice, though the exact number depends heavily on the specific image. For images that need lossless compression, WebP also usually beats PNG.
Why does my PNG look fine but my JPEG has visible blocky artifacts?
JPEG uses lossy, block-based (8x8 pixel) compression — push the quality down far enough and you'll start to see blocking or ringing around hard edges, especially text and sharp graphics. PNG is lossless, so it never introduces that kind of artifact, at the cost of a larger file for photographic content.
Can JPEG do transparency?
No — JPEG has no alpha channel at all. If you need any part of an image to be transparent, you need PNG or WebP.
Is WebP safe to use everywhere now?
For the overwhelming majority of modern browsers, yes. It's been supported across all major browsers for years at this point. The main reason to still reach for JPEG or PNG is compatibility with older tools in a pipeline (some image-processing software, older CMSes, certain print workflows) rather than browser support itself.
Does converting a JPEG to PNG improve its quality?
No — converting doesn't recover detail that JPEG's lossy compression already discarded. It'll stop further generational loss from re-saving, but it won't undo the original compression, and the file will likely get larger for no visual benefit.