Format · WebP

One extension.
Two codecs.

WebP is not a single format. It wraps a lossy codec and a separate lossless one, plus optional alpha and animation — and the file never tells you which mode produced it.

Lossy · Lossless · Alpha · Animation
Modes

Two codecs, one container

The mode is chosen at encode time. A decoder handles both transparently, which is convenient for delivery and unhelpful when you are trying to reason about a file you were handed.

ModeBeatsBy roughly
Lossy WebPJPEG25–35% at equal visual quality
Lossless WebPPNG20–40% on graphics, sometimes more
WebP with alphaPNG with alpha30–50% at equal quality

Ranges, not promises. Flat graphics gain the most; photographic content gains least.

Lossy

Against JPEG

Lossy WebP is the same family of ideas as JPEG — block transform, quantisation, entropy coding — with better prediction and a more efficient entropy coder.

JPEGLossy WebP
Block size8×8Variable, down to 4×4
PredictionNone across blocksIntra prediction from neighbours
AlphaNot supportedSupported
Typical sizeBaseline25–35% smaller
Decode supportUniversalUniversal in current browsers

Converting a photo library to WebP is a real saving, but it is a one-time optimisation: the JPEG master remains the thing you should keep. See JPG to WebP for the conversion path.

Lossless

Against PNG

Lossless WebP uses a completely different scheme: prediction plus a dedicated entropy coder, tuned for screen content.

Explainer

Why graphics gain so much

PNG relies on general-purpose deflate after a simple per-row filter. Lossless WebP predicts each pixel from its already-coded neighbours — left, above, and combinations — then codes the residual with a model built for image data. On flat UI, where prediction is almost perfect, the difference is dramatic.

On photographs the two converge: high entropy is high entropy, and neither lossless format can do much with it. That is why PNG remains a reasonable master format and a bad delivery format for photos.

Alpha is where it really pays

PNG stores an extra full-resolution channel for transparency. WebP compresses alpha as its own plane with the same prediction, which is why cut-outs with soft edges shrink dramatically without any quality decision.

Tradeoffs

What WebP does not solve

WebP is a delivery format with a compatibility tail. Three caveats worth knowing before you convert everything.

Older desktop software Pre-2018 tools, some print workflows and a few email clients still cannot open it.
Encode speed Slower than JPEG and faster than AVIF — the middle of the field rather than the winner at either end.
Not the smallest AVIF wins on size at equal quality. WebP wins on support and encode time.
Mode opacity You cannot tell lossy from lossless by looking at the file, which makes "is this lossless?" unanswerable without probing.
Compare

WebP in context

Three comparisons cover almost every decision.

Image formats compared places WebP against JPEG, PNG and AVIF with support and capability columns. What is JPEG is the baseline it improves on, and the compression guide explains where format sits among the levers.

FAQ

WebP — FAQ

Is WebP lossless or lossy?

Both. The encoder picks the mode; a `.webp` file can be either, and the extension does not say.

Can every browser show WebP?

Current Chrome, Firefox, Safari and Edge all can. The gap is old software and some desktop image viewers, not browsers.

Is converting PNG to WebP safe for UI assets?

With lossless WebP, yes — the pixels are identical. With lossy WebP you will see ringing on text edges.

Should I convert existing WebP files?

Only if they were encoded badly. Re-encoding lossy WebP at the same quality adds a generation for little gain.

WebP or AVIF for a new site?

WebP as the reliable default with an AVIF variant where you can measure the benefit. Both compress further than JPEG.

Does WebP support animation?

Yes — the extended container does. It is generally a better choice than an animated GIF, and a worse one than a video.

WebP · both modes

Convert to WebP, or shrink what you already have

Keep format or convert, lossless or lossy, batched over a folder with per-file results.

Download for Windows
Windows 10/11 · Offline · Free