JPEG vs PNG vs WebP — When to Use Which

JPEG, PNG or WebP? How each image format compresses, what it's good at, and which one actually gets you under a file-size limit.

The one-sentence version

JPEG for photos, PNG for graphics and transparency, WebP when you want the smallest file and modern support is fine. Everything below is the reasoning behind that sentence.

How each one compresses

JPEG (1992) is lossy: it splits the image into 8×8 pixel blocks, throws away high-frequency detail, and stores the rest. The quality setting controls how much detail is discarded. It’s spectacular at photographs — smooth gradients and textures compress 10–20× — and visibly bad at sharp edges: text and line art get “mosquito” artifacts around them. No transparency.

PNG (1996) is lossless: every pixel comes back exactly as saved. It compresses by finding repeated patterns, so flat-colored graphics shrink beautifully while photos — which are mostly per-pixel noise — barely compress at all. Full alpha transparency. This is why “compress my PNG to 100KB” is often impossible without shrinking dimensions: there is no quality knob, only pixel count.

WebP (2010) does both tricks: a lossy mode that typically beats JPEG by 25–35% at the same visual quality, plus a lossless mode and alpha transparency. Support is now universal across browsers. The remaining reason to reach for JPEG instead is compatibility with old software and form validators that only accept .jpg.

A practical comparison

JPEG PNG WebP
Compression Lossy Lossless Lossy + lossless
Transparency No Yes Yes
Photos Excellent Huge files Excellent, smallest
Text / screenshots Artifacts Crisp Good
Typical photo size 5–10× ~0.7×
Universal support Everywhere Everywhere All modern browsers

The dimension lever everyone forgets

Format choice aside, the single biggest factor in file size is pixel count, and it scales quadratically: a 2000×2000 image holds four times the pixels of a 1000×1000 one. Halving dimensions typically cuts a JPEG’s size by 60–75% before any quality change. When a KB target seems impossible, shrinking dimensions is the lever that always works — which is exactly what ImgSquash’s target-size mode does automatically after exhausting quality.

So which should you pick?

  • Uploading a photo to a form: JPEG, target-size mode.
  • Website images you control: WebP.
  • Screenshots, logos, transparency needed: PNG, then resize if it’s too big.
  • Anything you’ll edit again: keep a PNG master; export JPEG/WebP copies for use.

Try it live — the compressor converts between all three while it resizes, and the bulk tool converts a whole folder in one pass.

Frequently asked questions

Why is my PNG so much bigger than the same photo as JPEG?

PNG stores a lossless copy of every pixel — it can compress patterns and flat areas, but photographic detail is essentially random noise to it, so there's little to squeeze. JPEG was designed for photos: it discards frequency detail your eyes are bad at seeing, which is why a 3MB PNG often lands at 300KB as a JPEG.

Does converting PNG to JPEG lose quality?

Technically yes — JPEG is lossy. Practically, at quality 80+ a photograph looks identical at normal viewing size. Where you do see it: sharp text edges, line art and UI screenshots get slight ringing artifacts. And transparency is lost — JPEG has no alpha channel, so transparent backgrounds are flattened (this tool flattens onto white).

Is WebP always smaller than JPEG?

Usually 25–35% smaller at equivalent quality, and it supports transparency too — so it dominates JPEG on paper. The caveats: very old browsers and some older apps can't open it, and a few upload forms whitelist JPEG only. For web use it's the best default; for forms, JPEG is the safe pick.

When is PNG the right choice despite the size?

Screenshots with text you want crisp, logos and icons, anything with transparency, and images you'll edit again later — each JPEG re-save compounds artifacts, while PNG is bit-exact forever. If the file just needs to exist at full fidelity, PNG is the format. If it needs to fit a size limit, it usually isn't.

What about HEIC, AVIF and the newer formats?

HEIC is what iPhones shoot by default — great compression, poor support outside Apple land; convert to JPEG before uploading anywhere. AVIF beats WebP on size but encodes slowly and support is still settling. This tool reads JPEG/PNG/WebP and writes the same three, which covers what upload forms and browsers accept today.