Toolwise
Image Tools

JPG vs PNG vs WebP: Which Image Format Should You Use?

By the GrainZap Team8 min read
jpgpngwebpimage formatscompression
Advertisement

Most image format advice collapses into slogans — JPG for photos, PNG for logos, WebP for everything — that are broadly right and completely unhelpful the moment you hit an edge case. Why does a screenshot look fine as PNG and terrible as JPG? Why did converting a graphic to JPG make it bigger? Why does a logo lose its transparent background?

Lossy and lossless, the underlying split

Lossless compression stores the image so every original pixel can be reconstructed exactly. It works by finding genuine redundancy — a run of identical pixels described once instead of repeatedly — so it excels on flat colour and struggles on complex content. PNG is lossless.

Lossy compression permanently discards information the human eye is unlikely to miss, typically fine variations in areas where the eye is insensitive. The reconstructed image is an approximation. That's an excellent bargain for photographs, where nobody can identify the exact original shade of a particular leaf, and a poor one for a screenshot, where a slightly-wrong pixel next to a letter is immediately visible. JPG is lossy. WebP can be either.

This also explains why lossy compression is one-directional: once detail is discarded it cannot be recovered, and each further round discards more — an effect known as generation loss.

JPG: the photographic workhorse

JPG has been the default photographic format for three decades, and its compression is tuned specifically for photographic content — smooth gradients, gradual tonal shifts, natural texture. On that kind of image it's remarkably effective, routinely producing files a tenth the size of a lossless equivalent with no difference most people can see.

It gives you a quality dial, typically 0-100, which trades size against fidelity. Somewhere around 75-85 is the practical sweet spot for photos; below about 60, compression artifacts start appearing as blotchy patches in skies and gradients, and as visible blocking in flat areas.

Its two real weaknesses are sharp edges and transparency. JPG works on blocks of pixels, and a hard black-to-white transition — exactly what text and line art are made of — produces faint ringing artifacts around the edge, visible as a soft halo. And JPG has no alpha channel at all, so transparency is impossible: a transparent area has to be filled with a solid colour, usually white.

  • Best for: photographs, camera output, photo-like scanned pages, any image with smooth tonal variation.
  • Avoid for: logos, icons, screenshots, diagrams, text-heavy images, anything needing transparency.
  • Typical saving: very large on photos; sometimes negative on flat graphics, where a JPG can be bigger than the PNG it came from.
  • Support: universal — every browser, device, printer and application made in the last thirty years.

PNG: lossless and transparent

PNG was designed for exactly the content JPG handles badly. Being lossless, it reproduces every pixel precisely, so text stays crisp, lines stay clean and no artifacts are introduced no matter how many times you save it. Its compression works well on large areas of uniform colour, which describes most interface screenshots, logos, charts and diagrams.

It also supports a full alpha channel — 256 levels of transparency per pixel — which means genuinely soft, anti-aliased edges over any background. That's why a logo saved as PNG sits cleanly on a coloured page while the JPG version arrives in a white box.

The cost is size on photographic content. A photograph has almost no exact redundancy to exploit — adjacent pixels are similar but rarely identical — so lossless compression achieves very little. The same photo can easily be five to ten times larger as a PNG than as a good-quality JPG, with no visible benefit whatsoever. Screenshots that are mostly photograph rather than interface fall into the same trap.

Tip

A PNG screenshot that's unexpectedly huge usually contains a photo or a complex gradient. Check what's actually in the frame: if the content is photographic rather than flat interface elements, JPG or WebP will be dramatically smaller with no visible difference.

WebP: both modes in one format

WebP is the modern option, and its main advantage is that it doesn't force the lossy/lossless choice at the format level — it supports both modes. You pick lossy WebP for photographs and lossless WebP for graphics, and either way you get transparency support, which JPG lacks, and better compression than the older format you'd otherwise have used.

How much smaller, in practice

Lossy WebP typically produces files around 25-35% smaller than a JPG of comparable visual quality. Lossless WebP is usually around 20-30% smaller than an equivalent PNG. The exact figures vary with content — detailed, noisy images gain less than smooth ones — but the direction is consistent, and on an image-heavy page the cumulative saving is substantial for load time and bandwidth.

Crucially, WebP supports transparency in both modes. Lossy-with-transparency is something JPG simply cannot do, and it's genuinely useful: a photographic image with a soft transparent edge can be compressed lossily instead of being forced into a large PNG.

The compatibility question

In browsers, WebP is a solved problem — Chrome, Firefox, Safari and Edge have all supported it for years, so any current visitor can display it. Outside the browser, support is less uniform. Some older desktop applications, certain email clients, various print workflows and a number of upload forms still expect JPG or PNG and will either reject a WebP or fail to preview it.

The practical approach is to use WebP wherever you control the display — your own website, your own app — and keep a JPG or PNG copy for anything being handed to someone else's system. Converting back is easy, so this costs little.

A decision guide

Working through these in order gets you to the right format for almost any image:

  • Does it need transparency? If yes, JPG is out — use PNG, or WebP if you control the display.
  • Is it a photograph? Use JPG for maximum compatibility, or WebP for a smaller file at the same quality.
  • Is it a logo, icon, diagram, chart or screenshot of an interface? Use PNG for guaranteed crisp edges, or lossless WebP for the same result in a smaller file.
  • Does it contain readable text? Avoid JPG — lossy compression puts visible halos around lettering, and small text suffers most.
  • Is it going on your own website and file size matters? WebP, with a JPG or PNG fallback if you support older clients.
  • Is it being emailed, printed, or uploaded to a system you don't control? JPG for photos, PNG for graphics — compatibility beats a marginal size saving.
  • Is it a master copy you'll edit again later? Keep a lossless version — PNG or your editor's native format — and export lossy copies for distribution.

Watch out

Never edit and re-save a lossy image repeatedly. Every save applies compression again to an already-compressed image, and the degradation accumulates. Keep a lossless master, edit that, and export a fresh lossy copy each time you need one.

Frequently asked questions

Does converting PNG to JPG lose quality?

Yes, though whether you notice depends entirely on the content. For a photograph at a high quality setting the loss is imperceptible and the size saving is large. For a screenshot, a logo or anything with text, the loss is visible as soft halos around sharp edges, and the size saving is often small — so the trade rarely makes sense.

Can I convert JPG to PNG to recover quality?

No. The detail JPG discarded is gone permanently; a PNG made from it simply stores the already-degraded result losslessly, usually in a much larger file. Converting to PNG is only useful when you're about to edit the image and want to avoid adding further generation loss.

Which format is best for a website?

WebP for most images, since it's smaller than both alternatives at comparable quality and is supported by every current browser. Use SVG for logos and icons where vector artwork exists. Keep JPG or PNG copies for anything users might download, or for systems outside your control that may not accept WebP.

Reduced to a sentence: photographs want lossy compression, graphics and text want lossless, transparency rules JPG out entirely, and WebP does either job in a smaller file wherever you can rely on the display supporting it. Match the format to what's actually in the image rather than to habit, and keep a lossless master of anything you'll edit again.

Advertisement

Ready to put this into practice?

Convert an Image Free

More guides