UnHEIClocal image lab

Container literacy

HEIC vs HEIF vs AVIF: What’s the Difference?

HEIF is the container; HEIC is HEIF holding HEVC-coded images, the format iPhones save; AVIF is the same container holding AV1-coded images, the format websites serve. Same box, different codec inside.

HEIC, HEIF and AVIF compared

NameWhat it isWhere files come fromWhat opens itConvert
HEIFThe container standard (ISO/IEC 23008-12). Holds images, thumbnails, depth maps, bursts and metadata.Android phones and cameras that save .heif, and as the wrapper for both formats belowDepends on the codec inside; Windows needs the HEIF Image ExtensionsConvert HEIF to JPG
HEICHEIF holding HEVC (H.265) coded images, saved as .heic.iPhone and iPad camera by default since iOS 11Apple devices natively; Windows with the HEIF and HEVC Video Extensions; no browser except Safari displays itConvert HEIC to JPG
AVIFHEIF holding AV1 coded images, saved as .avif.Websites and CDNs serving small images; some newer cameras and phonesChrome, Firefox, Safari and Edge; many desktop editors and web forms still refuse itConvert AVIF to JPG

Which is smaller? HEIC and AVIF both store a photo in roughly half the space of a JPEG at similar visual quality, which is why phones and websites adopted them. The catch is support: a JPEG opens everywhere, so converting is the usual fix when a file is refused. Converting to JPG gives the broadest support; converting to PNG avoids a second lossy step, as HEIC to PNG does.

Is a .heif file the same as .heic? Often, but not always. An iPhone photo renamed .heif is still HEIC inside, while a .heif from a camera may carry a different codec, and an .avif is AV1 in the same container. The extension is a label; the format detector reads the brand from the file itself.

The three terms in detail

HEIF

High Efficiency Image File Format is a family of image containers built on ISO Base Media File Format. It can hold a primary image, thumbnails, auxiliary images, metadata, and sequences.

HEIC

HEIC is the common extension and compatibility label used for HEIF files containing HEVC-coded images, especially Apple camera photos. The container may still hold more than one item.

AVIF

AVIF uses the same container family with AV1 image coding. The avif brand identifies a still image profile; avis identifies an image sequence.

What the ftyp brands say

Brand examplesBounded interpretationImportant limit
heic, heix, heim, heisHEVC-coded HEIF compatibility profilesA brand does not prove every image item or metadata block is decodable.
mif1Generic HEIF image compatibilityThe codec needs additional item properties; “HEIC” should not be guessed.
msf1HEIF image sequence compatibilityTiming and playback semantics require deeper parsing.
avifAVIF still-image compatibilityAuxiliary alpha, HDR, and metadata behavior still need decoder support.
avisAVIF image sequenceA converter must define whether it keeps animation or selects a frame.

Why this matters during conversion

Orientation: a decoder may apply orientation while removing the original tag. Output pixels and output metadata must be checked separately.

Metadata: EXIF, GPS, capture dates, thumbnails, and maker notes are independent items or properties. Browser decoders commonly omit them from a newly encoded JPG or PNG.

Color and HDR: ICC, nclx color information, wide gamut, HDR transfer characteristics, and bit depth can be transformed or lost through browser canvas paths.

Multiple images: depth maps, bursts, sequences, and auxiliary images require an explicit selection policy. Silently taking the first decoded blob is not preservation.