Skip to main content

AVIF vs WebP

AVIF and WebP are both in wide use and are chosen for different reasons. This page sets them against each other on the things that decide between them, and links to the converters for both directions — every one of which runs in your browser, with the file never uploaded.

The short answer

AVIF produces smaller files, and at low bitrates it is not a small difference: where WebP starts to smear and blotch, AVIF still holds together. On a page of photographs that is real bandwidth, and for a large hero image it can halve what the visitor downloads.

WebP wins on everything around the file. It encodes several times faster, it has been read by every browser for years longer, and desktop and mobile support for it — while imperfect — is far ahead of AVIF's. For flat graphics the size advantage largely evaporates, and there the two are close enough that compatibility should decide.

There is also a cost that does not show up in a size comparison: encoding time. A large photograph that becomes a WebP in a moment can take several seconds as AVIF, and that is on your device rather than a server. For one hero image it is nothing; for a batch of two hundred it is the difference between a minute and a coffee break.

Side by side

AVIF and WebP compared on the properties that separate them.
PropertyAVIFWebP
CompressionLossless or lossyLossless or lossy
Colour12 bits per channel8 bits per channel
TransparencyFull alpha channelFull alpha channel
AnimationYesYes
Keeps EXIFYesYes
Browser supportChrome 85, Firefox 93, Safari 16Chrome 32, Firefox 65, Safari 14
Size of a photograph40 to 60 percent smaller than a JPG25 to 35 percent smaller than a JPG
Published20192010

Where they actually differ

  • For the same photograph at comparable visible quality, AVIF produces the smaller file — usually by enough to matter on a page carrying several images.
  • They are 9 years apart, and most of what separates them is what had been learned in between.

What people get wrong

  • Expect the file to change size substantially in one direction. That is the formats behaving as designed rather than a failed conversion, and it catches people who assume a conversion is roughly size-neutral.

Which to choose

Choose AVIF when
Choose AVIF for photographs on a page where size matters most and the audience is on the web, and where a slow encode is acceptable.
Choose WebP when
Choose WebP as the sensible default: nearly as small, far faster to produce, and supported in more places than AVIF is.

Converting between them

Common questions

Should I serve both?
If you can, yes. A picture element listing AVIF first, WebP second and JPG last lets each browser take the best format it understands, and costs nothing to visitors whose browser skips the first two. If you cannot control the markup, WebP alone is the safer single choice.
Which of AVIF and WebP is better?
Neither, in general — if one were simply better the other would have disappeared. They are good at different things, and the short answer above says which is which. The useful question is what the file has to do next: be edited, be published, be opened by somebody else, or fit inside a size limit.
Does converting between them lose anything?
It depends on the direction. Converting into a format that stores everything loses nothing but does not recover anything either; converting into one that discards detail loses a little each time. The table above says which of these two does which.
Can I convert back afterwards?
The file will convert back, but whether it comes back unchanged depends on the direction. Between two formats that store everything, a round trip is lossless. Where one of them discards detail, that detail is gone and the return journey cannot invent it.
Can I use both?
On a web page, often yes, and it is usually the right answer: serve the smaller modern format and list an older one as a fallback so each browser takes what it understands. For a file you are handing to a person, pick one — the one they can open.
Which one does my software support?
The side-by-side table above says which browsers read each, which is the part that varies most. Desktop support is harder to state in general and tends to lag browsers by years, so if the file is going to somebody else, the older and more widely read of the two is the safer choice.
Is converting between them free?
Yes, with no account and no limit on how many files you convert. Every converter linked from this page runs in your browser: the file is read from your device, converted by code running on it, and handed back as a download.
Is my file uploaded?
No. There is no conversion server here to upload it to, and no third-party service is involved. You can confirm it yourself: open your browser's developer tools, switch to the Network panel with no filter, and run a conversion — no request carries your file.

Ads on this site

Advertising pays for this site. The ads may store cookies to choose what to show you and to avoid repeating themselves. Your files are not involved in any of it — they never leave your browser, whichever button you press, and every tool works either way.

What this covers