Metadata Editor

EXIF EditorEXIF ReaderRemove MetadataGuidesGlossaryAbout

HEIC file: how an iPhone photo stores its metadata

HEIC metadata at a glance

Full nameHigh Efficiency Image File Format, HEVC-coded
Extensions.heic, .heif
MIME typeimage/heic
EXIFYes (Exif item in the meta box)
IPTCNo (XMP only)
XMPYes (mime item, application/rdf+xml)
C2PAYes (uuid box)
On metadata-editor.comHEIC files cannot be uploaded to our tools. Use ExifTool or the methods on this page.

A HEIC file is a still image compressed with HEVC (H.265) and stored in HEIF, the ISO/IEC 23008-12 container built on the same ISO base media format as MP4. Apple introduced it with iOS 11, and iPhone 7 and later can shoot in it. Metadata is not a header in front of the pixels: EXIF and XMP are separate items in the file, linked to the image they describe.

Inside an iPhone HEIC file

An iPhone 13 photo (iOS 15.6.1) lists 53 items:

$ exiftool -v2 iphone.heic | grep -E 'Item (4[89]|5[0-3]): Type'
  | |   Item 48: Type=hvc1 Name= ContentType=
  | |   Item 49: Type=grid Name= ContentType=
  | |   Item 50: Type=Exif Name= ContentType=
  | |   Item 51: Type=mime Name= ContentType=application/rdf+xml
  | |   Item 52: Type=hvc1 Name= ContentType=
  | |   Item 53: Type=mime Name= ContentType=application/rdf+xml

Items 1 to 48 are 512x512 HEVC tiles. Item 49 is the grid that assembles them into the 4032x3024 primary image. Item 50 is the EXIF, and item 51 the XMP, both attached to item 49 by a cdsc (content describes) reference. Item 52 is a second HEVC image at 2016x1512, linked to the primary as an auxiliary image: the HDR gain map. Item 53 is the gain map's own XMP.

The file opens with an ftyp box giving the brands (heic, plus mif1, MiHE, miaf, MiHB as compatible), then a meta box with the item list, locations and properties, then mdat with the actual bytes. Display rotation is an irot property on the image item, separate from the EXIF Orientation tag.

HEIC metadata an iPhone writes

The Exif item begins with a 4-byte offset (00 00 00 06), then Exif\0\0, then a big-endian TIFF structure: the same IFD0, ExifIFD and GPS IFD a camera JPEG has. The iPhone fills in camera and lens fields, Apple maker notes, a Display P3 ICC profile, and a GPS block with more than coordinates: GPSHPositioningError, GPSImgDirection (which way the phone pointed) and GPSSpeed.

There is no IPTC in HEIC. Captions, keywords and rights go in XMP. The C2PA specification places Content Credentials in a uuid box after ftyp and before mdat.

Reading and stripping a HEIC without converting

Our tools do not accept HEIC uploads. ExifTool reads and writes it directly:

exiftool -a -G1 -s IMG_1820.heic
exiftool -gps:all= IMG_1820.heic

The second command removes the GPS IFD and leaves everything else. exiftool -all= goes further but not all the way: on the iPhone 13 file it removed the Exif item, the main XMP and the ICC profile (with a warning), while the gain map's XMP and the irot rotation survived. Run exiftool -a -G1 afterwards and check what is left.

On the phone itself, the Info panel in Photos shows and adjusts location and date; see how to view photo metadata on iPhone. Windows needs two Store add-ons to open HEIC at all: HEIF Image Extensions and HEVC Video Extensions.

When converting HEIC to JPEG makes sense

Convert when the destination cannot read HEIC: older software, some upload forms, or tools like our EXIF editor that only take JPEG and TIFF. Apple already converts in some cases. AirDrop, Messages and mail may send a more compatible format such as JPEG, and importing over USB to a PC or Mac can convert too, unless Settings > Apps > Photos is set to Keep Originals. Settings > Camera > Formats > Most Compatible makes the camera shoot JPEG from the start.

On a Mac, File > Export in Photos or Preview converts one file, and sips does it from the terminal:

sips -s format jpeg IMG_1820.heic --out IMG_1820.jpg

What you lose: the HDR gain map (the JPEG shows only the SDR rendition), some quality from re-encoding, and possibly metadata. ImageMagick 6.9.12 with libheif 1.17.6 wrote the EXIF into the JPEG without its Exif\0\0 header, so ExifTool found no EXIF at all:

$ convert IMG_1820.heic IMG_1820.jpg
$ exiftool -G1 -s -Make -Model -ProfileDescription IMG_1820.jpg
[ICC_Profile]   ProfileDescription              : Display P3

exiftool -tagsfromfile IMG_1820.heic -all:all IMG_1820.jpg copied everything back, Make and Model included. Check any converted file before deleting the originals.

FAQ

Other formats

AVIF metadata: what an AVIF file keeps from the original photo

AVIF metadata uses the HEIF item model: an Exif item, an XMP item and an ICC color property. What encoders keep and why converted files carry stale values.

JPG file format: segments, metadata and what survives an export

How a JPG file stores metadata: Exif and XMP in APP1, ICC and MPF in APP2, IPTC in APP13, C2PA in APP11, and how to edit it without recompressing the image.

DNG file metadata: inside Adobe's open raw format

A DNG file is a TIFF-based raw format that keeps EXIF, IPTC and XMP inside the file. How DNG metadata is laid out, how to edit it, and what ProRAW adds.

Guides

Other Metadata Tools