What Is an .AVIF File?

AV1 Image File Format

📂Image
🏷️.avif
🎯image/avif

AVIF Image (.avif)

Overview

AVIF (AV1 Image File Format) stores still images and image sequences using the AV1 video codec's intra-frame compression inside an ISO base media container, the same family as MP4 and HEIF. It was published by the Alliance for Open Media in 2019 and is royalty-free.

AVIF's reason to exist is compression: for photographs it typically reaches the quality of a JPEG at half the file size, and it beats WebP as well. It supports transparency, HDR, wide colour gamut and lossless mode, which makes it a candidate to replace JPEG, PNG and GIF at once on the web.

Technical Specifications

  • MIME Type: image/avif
  • File Extensions: .avif; .avifs for image sequences
  • Category: Image
  • Container: HEIF structure (ISO/IEC 23008-12) on the ISO base media file format
  • Codec: AV1 intra frames
  • Bit depth: 8, 10 and 12 bits per channel
  • Colour: 4:2:0, 4:2:2, 4:4:4 chroma subsampling; HDR (PQ, HLG); ICC profiles
  • Features: alpha channel, lossless mode, animation, layered images, grid tiling for very large images
  • Published: February 2019 by the Alliance for Open Media
  • Magic bytes: 66 74 79 70 61 76 69 66 (ftypavif) at offset 4

Identification

00000000  00 00 00 1c 66 74 79 70  61 76 69 66 00 00 00 00  |....ftypavif....|
00000010  61 76 69 66 6d 69 66 31  6d 69 61 66 00 00 00 f2  |avifmif1miaf....|

A 4-byte box size, then ftyp and the brand avif. The compatible brands that follow (mif1, miaf) show the file is also a valid HEIF. An AVIF sequence uses the brand avis.

History and Development

AV1 was finalised in 2018 as a royalty-free successor to VP9 and a competitor to HEVC, with Google, Mozilla, Netflix, Apple, Microsoft and Amazon among its backers. AVIF applied the codec's still-image mode to the HEIF container, reusing the structure Apple had adopted for HEIC but without HEVC's licensing cost.

Browser support arrived quickly: Chrome 85 (2020), Firefox 93 (2021), Safari 16 (2022). By 2023 every current browser decoded AVIF, and it became the first new image format since WebP to be safely usable on the web.

Common Use Cases

  • Web images: photographs and hero images where bandwidth matters; served with a JPEG or WebP fallback via <picture>
  • HDR photography display on the web
  • Image CDNs: Cloudflare, Cloudinary, imgix and others convert to AVIF automatically for supporting browsers
  • Transparent graphics that would otherwise be large PNGs
  • Short animations as a smaller alternative to GIF

How to Open an AVIF File

Browsers

Every current browser displays AVIF: Chrome, Edge, Firefox, Safari (macOS 13 and iOS 16 and later), Opera. Dragging the file into a tab is the quickest viewer on any platform.

Windows

  • Windows 10 (1903+) and 11: Photos and File Explorer thumbnails open AVIF once the free AV1 Video Extension is installed from the Microsoft Store. Some editions bundle it.
  • Paint in Windows 11 opens and saves AVIF.
  • IrfanView and XnView with their plugin packs; GIMP 2.10.22 and later.

macOS

  • Preview, Photos and Quick Look support AVIF natively since macOS 13 Ventura.
  • Older versions: a browser, or GIMP 2.10.22+.

Linux

  • GIMP, Eye of GNOME, gThumb and most GTK viewers through the libheif or libavif loaders; install heif-gdk-pixbuf or avif-pixbuf-loader if thumbnails are missing.

iPhone, iPad and Android

  • iOS 16 and later open AVIF in Photos and Files.
  • Android 12 and later decode it system-wide; Google Photos displays it.

Editors

  • GIMP (2.10.22+), Photoshop (2023+ with the native plugin), Affinity Photo 2, Krita, Paint.NET with the AvifFileType plugin.

How to Convert an AVIF File

From JPEG or PNG to AVIF

# avifenc, the reference encoder (libavif)
avifenc --min 0 --max 63 -a end-usage=q -a cq-level=28 --speed 6 photo.jpg photo.avif

# ImageMagick 7
magick photo.jpg -quality 60 photo.avif

# Lossless (for graphics with transparency)
avifenc --lossless logo.png logo.avif

A cq-level around 25 to 32 matches a JPEG of quality 80 to 90 at a fraction of the size. Lower --speed values compress better and take longer; 6 is a sensible default, 4 for final assets.

From AVIF to JPEG or PNG

avifdec photo.avif photo.png
magick photo.avif photo.jpg

Use PNG when the AVIF has transparency or 10-bit colour; JPEG discards both.

Batch conversion and web tooling

  • Squoosh (squoosh.app): browser-based, shows size and quality side by side.
  • sharp (Node.js): sharp("in.jpg").avif({ quality: 60 }).toFile("out.avif").
  • cwebp-style CLI: avifenc loops in a shell script; XnConvert for a graphical batch.
  • Astro, Next.js and most frameworks' image components emit AVIF automatically with a fallback.

Serving with a fallback

<picture>
  <source srcset="photo.avif" type="image/avif">
  <source srcset="photo.webp" type="image/webp">
  <img src="photo.jpg" alt="Description" width="1200" height="800">
</picture>

Advantages

  • Smallest files of any widely supported web format at the same quality.
  • Royalty-free, with an open reference implementation.
  • Feature-complete: alpha, HDR, wide gamut, lossless, animation.
  • Universal browser support since 2023.

Limitations

  • Slow encoding: an order of magnitude slower than JPEG or WebP at good settings. Fine for build pipelines and CDNs, awkward for real-time use.
  • Patchy desktop support on older operating systems; Windows needs an extension.
  • Progressive loading is weaker than JPEG's, so large images appear all at once rather than refining.
  • Soft at low quality: AV1 tends to smooth fine texture, which can look worse than JPEG's blockier failure mode in some photographs.
  • HEIF: the same container with HEVC instead of AV1; Apple's default camera format.
  • JXL: the other modern contender, stronger at lossless and progressive loading.
  • WEBP: the previous web-format step, still a good fallback.
  • JPEG and PNG: what AVIF replaces.

How to identify .AVIF files from the bytes

AV1 Image File Format files carry a fixed byte pattern, the file signature or magic number, that identifies them regardless of the extension. This is what our detector reads.

OffsetHexASCII
466 74 79 70 61 76 69 66ISO base media container; ftypavis for image sequences.ftypavif

Check a file yourself: xxd -l 16 file.avif on macOS and Linux, or Format-Hex file.avif | Select-Object -First 1 in PowerShell.Full AVIF signature reference

File Information

File Description

AV1 Image File Format

Category

Image

Extensions

.avif

MIME Type

image/avif

Related File Types

Other file types in the Image category you might also need:

Start Analyzing AVIF Files Now

Use our free AI-powered tool to detect and analyze AV1 Image File Format files instantly with Google's Magika technology.

⚡Try File Detection Tool