HEIC vs HEIF: container, codec and the file extensions

One-line answer

HEIF is the container format. HEIC is what people call a HEIF file whose image data is compressed with HEVC. Almost every .heic file from an iPhone is a HEIF file in this sense, so for everyday purposes the two names refer to the same thing.

What HEIF specifies

The HEIF technical overview from Nokia describes HEIF as ISO/IEC 23008-12. It defines how to store individual images, image sequences and their metadata in a file built on the ISO Base Media File Format (ISO/IEC 14496-12), the same family of box-structured files used for MP4 video.

The page makes several design points worth knowing:

So the container says how things are arranged, and the codec says how pixels are compressed.

Where HEIC fits

HEIC is the label for the HEVC flavour. The libheif README says HEIC and AVIF are file formats employing HEVC (H.265) or AV1 image coding respectively. It lists, among the formats it supports, HEIC, AVIF, VVC, AVC, JPEG inside HEIF, JPEG 2000 and uncompressed data, and names libde265 as the default HEIC decoder.

That has a practical consequence: a file ending in .heif can contain a codec other than HEVC. The AVIF specification is explicit that it defines storage of AV1 images in the generic HEIF format. So AVIF is also a HEIF-family file, but it does not decode with an HEVC decoder.

Extensions you will meet

Because a name can mislead, the safest check is to look inside. The file checker reports the true type, codec, dimensions and image count, and the HEIC inspector shows brands, the primary item, grids and tiles, thumbnails and colour profiles.

Why it matters when something fails

If software opens .heic but not a .heif from another source, the usual cause is the codec inside, not the container. libde265 is an open implementation of the H.265 decoder, which is what an HEVC-in-HEIF reader needs. A reader built only for AV1 content will not handle it, and the reverse is also true.

The health check is built for this situation. It looks for a wrong extension, an invalid container, or an unsupported codec such as AV1 or JPEG inside HEIF, and then tries a real decode. The HEIF structure viewer goes down a level and shows the box tree with offsets and sizes, which is useful when you are debugging a damaged file.

Which name should you use

For background on why the format exists and where it is supported, start with what is HEIC. If you are choosing a web format instead, HEIC vs WebP and AVIF covers the AVIF side.

Use these tools

Sources

By Hammer Desenvolvimento de Software · Last updated 2026-11-10