1. Home
  2. Guides
  3. What is an AVIF file?

AVIF · Image formats

What is an AVIF file?

AVIF is an image format released in 2019 by the Alliance for Open Media, built by taking a single frame of AV1 video compression and packaging it in the same container family that Apple uses for HEIC. It produces files roughly half the size of an equivalent JPEG, supports transparency, high dynamic range and wide colour, and — the detail that decided its fate — is royalty-free. That last point is why every current browser adopted it while refusing HEIC, which is technically similar but patent-encumbered. The catch is everything outside a browser: desktop software, upload forms and print services largely do not read AVIF yet, so a file that displays perfectly on a web page frequently cannot be used anywhere else.

Where it came from

The Alliance for Open Media was formed in 2015 by a group including Google, Mozilla, Netflix, Amazon, Microsoft and Apple, with a specific goal: produce a video codec that was competitive with HEVC and free of royalty obligations. The result was AV1, finalised in 2018.

AVIF is what you get when you take AV1 and use it to compress a single still image. Video codecs are extremely good at compressing individual frames, since that is most of what they do, so repurposing one for still images is a well-established trick — it is exactly how HEIC was made from HEVC.

The format specification arrived in 2019, and browsers moved fast: Chrome in 2020, Firefox in 2021, Safari with version 16 in 2022. That is unusually quick for a new image format, and the reason is licensing rather than technical merit.

Need to convert the file?

AVIF to JPG

AVIF and HEIC are cousins

This is the connection that makes the whole landscape make sense. Both formats use the same container, HEIF, standardised as ISO/IEC 23008-12. Both work by wrapping still frames from a video codec in that container. Structurally they are the same idea executed twice.

The difference is the codec inside. HEIC uses HEVC, which is covered by a large patent pool and requires royalty payments from anyone shipping a decoder. AVIF uses AV1, which the Alliance for Open Media built specifically so that it would not.

That single distinction explains a great deal. It is why Chrome and Firefox will display an AVIF but refuse a HEIC despite the formats being close relatives. It is why Apple, which had already paid for HEVC licensing, adopted HEIC years earlier. And it is why AVIF became a web format while HEIC remains a camera format.

What it is genuinely good at

Compression, first. At matching visual quality AVIF is typically around half the size of JPEG and 20 to 50 per cent smaller than WebP. The advantage is largest on images with smooth gradients, flat colour and soft detail, and narrows considerably on dense photographic noise.

It also handles things JPEG cannot represent: a full alpha channel for transparency, 10 and 12 bits per colour channel, high dynamic range, wide colour gamut, and animation. One format covers the jobs that currently need JPEG, PNG and GIF between them.

It degrades unusually gracefully, too. Pushed to very low bitrates, JPEG breaks into blocks and ringing artefacts that are immediately recognisable as compression damage. AVIF tends to go soft and slightly smeared instead, which most people read as a slightly blurry photo rather than a broken one.

Three costs worth knowing

It is slow to encode. Substantially slower than JPEG or WebP, sometimes by an order of magnitude at high quality settings. For images generated ahead of time this does not matter. For images produced on demand it very much does.

It is slower to decode as well. On a modern phone this is invisible; on a cheap or old one, a page full of large AVIF images can take visibly longer to paint than the same page in WebP, even though far fewer bytes were downloaded. It is possible to make a page technically lighter and perceptibly slower at the same time.

And support outside browsers is thin. Windows needs an extension from the Microsoft Store. Many desktop editors, most upload forms, print services and older phones do not read it. This is the gap that turns a saved AVIF into a nuisance.

Why no browser tool can create one

There is an asymmetry here that catches people out. Browsers can decode AVIF perfectly well, which is the whole point of the format. But the canvas API — the mechanism a web page uses to write out an image — supports only JPEG, PNG and WebP as output formats. AVIF is not on the list in any browser.

The practical consequence is that any converter running entirely in your browser can read AVIF and cannot write it. That is why this site offers AVIF to JPG, PNG and WebP but nothing in the other direction, and it is a limitation of the platform rather than a decision.

Producing AVIF requires a server-side encoder, a desktop tool, or a build step in your website pipeline. If your image host or CDN offers automatic format negotiation, that is usually the easiest route.

Keep it or convert it

Keep it if the image is going onto a website you control. It is the best-compressing option available and converting to anything else makes your pages heavier for no gain.

Convert it for every other destination. AVIF to JPG for photographs going into documents, forms or print. AVIF to PNG when the image has transparency you need to preserve. AVIF to WebP when you want to stay small but need something more widely understood.

The rule is the same one that applies to WebP, just one generation further along: excellent on the web, awkward the moment it leaves.

Frequently asked questions

What is an AVIF file?

An image compressed with AV1, the royalty-free video codec, and stored in the HEIF container. It was released in 2019 and produces files roughly half the size of an equivalent JPEG.

Why will my computer not open an AVIF?

Because support outside browsers is still thin. Windows needs an extension from the Microsoft Store, and many desktop applications have not added it. Any current browser will display one if you drag the file into a tab.

Is AVIF better than WebP?

It compresses better, typically by 20 to 50 per cent, and supports HDR and wider colour. WebP decodes faster, encodes far faster, and is much better supported outside browsers, so it is often the more practical choice.

What is the difference between AVIF and HEIC?

They share the same container and the same basic design, but AVIF uses the royalty-free AV1 codec while HEIC uses patent-encumbered HEVC. That is why browsers display AVIF and refuse HEIC.

Can I convert an image to AVIF in my browser?

No. Browsers can decode AVIF but the canvas API cannot write it — only JPEG, PNG and WebP are available as output. Creating AVIF needs a server-side or desktop encoder.

Should I use AVIF on my website?

Yes, as the first source in a picture element with WebP and JPEG fallbacks. Browsers take the first format they understand, so you get the smallest files where they are supported and nothing breaks where they are not.