What is AVIF?

The smallest mainstream image format — roughly half the size of JPEG at similar quality — with real costs in encoding time and tooling.

AVIF at a glance

Extension
.avif
Based on
The AV1 video codec, as a still-image container.
Compression
Lossy and lossless.
Transparency
Yes, full alpha channel.
vs JPEG
Roughly 50% smaller at similar visual quality.
vs WebP
Roughly 20–30% smaller.
Extras
HDR, wide colour gamut, 10- and 12-bit depth.
Main cost
Encoding is slow — often 10× or more the time of a JPEG encode.

Understanding AVIF

Why it compresses so well

AVIF is a still frame from the AV1 video codec, wrapped in an image container. Video codecs have received enormous engineering investment — every percentage point saved matters across billions of hours of streaming — and AVIF inherits all of it.

Where JPEG offers one block size and one prediction strategy, AV1 offers many: variable block sizes down to 4 × 4 and up to 128 × 128, dozens of prediction modes, and sophisticated filtering to suppress artefacts. The encoder tries far more possibilities and picks the cheapest.

That is also precisely why it is slow. The gain comes from searching a much larger space.

What it does that WebP cannot

Higher bit depth. 10- and 12-bit colour, which largely eliminates the banding that 8-bit formats show across wide gradients.

HDR and wide gamut. Genuine high dynamic range with the metadata to describe it, which matters as more displays support it.

Better low-quality behaviour. AVIF at very low bitrates stays coherent where WebP goes soft and JPEG breaks into squares — useful for thumbnails and placeholders.

The costs, stated honestly

Encoding time. Often ten times a JPEG encode or worse, depending on the effort setting. For a build pipeline processing images once, that is fine. For anything encoding on demand, it is a real constraint.

Decode cost. Higher than JPEG, which is measurable on low-powered devices displaying many images.

Tooling. Support outside browsers is thinner than WebP's, and thinner still in ordinary desktop applications.

Small images. AVIF carries more container overhead, so for very small images — icons, tiny thumbnails — it can be larger than WebP.

Why this site does not offer AVIF encoding

Every tool here encodes through the browser's own canvas. Chrome and Firefox can display AVIF but cannot write it — there is no AVIF encoder exposed to canvas.toBlob.

Worse, when a canvas is asked for a format it cannot write, it does not fail: it silently returns a PNG. An "AVIF compressor" built this way would hand most visitors a PNG with the wrong extension. So the tools here probe what your browser can genuinely encode and disable anything it cannot, and there is no AVIF page pretending otherwise.

Producing AVIF in a browser requires shipping a WebAssembly encoder of a megabyte or more. That is a defensible thing to build; it is not something to imply you already have.

The practical recommendation

If you have a build pipeline that can generate multiple formats, serve AVIF first, WebP as the fallback, JPEG last. That captures the most bytes for readers whose browsers support it.

If you are optimising images by hand, WebP alone captures most of the available benefit at a fraction of the effort, and every current browser supports it.

Try it yourself

Everything below runs in your browser, so you can test any of this on your own files without uploading them.

  • Compress WebP

    Re-encode existing WebP files, or convert JPEG and PNG into WebP.

    Open the tool
  • JPG to WebP

    Typically 25–35% smaller at matched quality. The standard web win.

    Open the tool
  • Compress JPEG

    Shrink JPG and JPEG photographs with a quality slider or an exact target size.

    Open the tool
  • Bulk compressor

    One setting across a whole folder, processed in parallel, downloaded as a ZIP.

    Open the tool

Questions

Frequently asked questions

Every answer below is present in the page source, expanded, so it can be read without opening anything.

Can I convert images to AVIF on this site?

No, and we would rather say so plainly. Browser canvas encoders in Chrome and Firefox cannot write AVIF, and a canvas asked for an unsupported format silently returns a PNG instead. Shipping an AVIF page here would mean handing most visitors a mislabelled file. Use a desktop encoder such as avifenc, ImageMagick or Squoosh.

Do browsers support AVIF?

For display, yes — Chrome, Firefox, Edge, Opera and Safari all decode it. Encoding is a separate question, and browsers generally do not expose an AVIF encoder to web pages.

Is AVIF really half the size of JPEG?

At matched visual quality, roughly, for typical photographic content. The figure varies with the image and with how much encoding effort you allow — a fast AVIF encode gives up much of the advantage.

Should I use AVIF or WebP?

AVIF if you have a build pipeline that can produce it and fall back gracefully. WebP if you are working by hand — it is supported everywhere, encodes quickly, and already gives you 25–35% off JPEG.

Is AVIF good for small images?

Often not. Its container overhead is larger, so for icons and small thumbnails WebP or even PNG can produce a smaller file. The advantage grows with image size.

Does AVIF support transparency and animation?

Both. It has a full alpha channel and supports animation, though animated AVIF tooling is less mature than animated WebP.

From the blog

Related reading

Longer, more practical guides from the blog.

  • Image Formats

    WebP vs JPEG: Which Should You Use, and When JPEG Still Wins

    WebP produced a 27.0 KB file against MozJPEG's 41.1 KB on the same photograph at slightly higher measured fidelity — 34% smaller. It also produced a larger file than JPEG on random noise. The advantage is real and content-dependent.

    9 min read

  • Practical Guides

    How to Compress Images for a Website Without Wrecking Them

    Resize before you compress. Measured on one photograph: half the width at quality 80 produced a 16.4 KB file, while full width at quality 40 produced 20.6 KB and looked far worse. The order of operations matters more than the settings.

    8 min read

  • Image Compression

    JPEG Quality Settings Explained: What the Number Actually Means

    Quality 80 is not 80% of anything. It is an index into a quantisation table. Measured on one photograph: dropping from 100 to 90 removes 77% of the file and 4.2 dB of fidelity; dropping from 40 to 30 removes 17% and costs almost as much.

    8 min read