66

HEIC file signature

Magic number at offset 4 · ftypheic

66 74 79 70 68 65 69 63

HEIC is an ISO Base Media (ftyp) file. Bytes 4 to 7 are ftyp and the major brand at offset 8 is heic (other HEIF brands are heix, mif1 and hevc). The first four bytes are the box size, not part of the signature.

Hex signature
66 74 79 70 68 65 69 63
Offset
4 bytes
ASCII
ftypheic
Length
8 bytes

What this magic number means

A magic number is a short, fixed run of bytes at a known position that tells a program what a file really is, no matter what the filename says. If a file contains, at offset 4, the bytes 66 74 79 70 68 65 69 63 (the text ftypheic), it is a HEIC file.

Because the ftyp box is preceded by its length, the recognisable bytes start at offset 4, not 0. HEIC shares the ISO BMFF container family with MP4, MOV and AVIF.

Formats that use the 66 74 79 70 signature

These file types in our database carry this signature:

It is also seen in: HEIF, HEIX.

How to check a file's signature

You can read the first bytes of any file yourself. The magic bytes are shown in hex, the same way this page lists them.

Linux & macOS

  • xxd -s 4 -l 8 example.heic
  • hexdump -C -s 4 -n 8 example.heic
  • file example.heic

Windows (PowerShell)

  • Format-Hex -Path example.heic -Count 16

Python

  • f=open("example.heic","rb");f.seek(4);f.read(8).hex()

In your browser

Frequently asked questions

What is the HEIC file signature?

HEIC files carry, at offset 4, the hex bytes 66 74 79 70 68 65 69 63 (ftypheic in ASCII). This magic number identifies the format regardless of the file's name or extension.

How do I check a file's magic number?

Open the file in a hex editor, or run a command such as xxd -l 16 example.heic on Linux or macOS, or Format-Hex -Path example.heic -Count 16 in Windows PowerShell, and read the first bytes.

Can a file fake the HEIC signature?

Renaming a file does not change its bytes, so the extension can lie but the signature usually cannot. A genuine HEIC file has these exact bytes; a file with the wrong bytes is not really HEIC, whatever its name says.

Related signatures

Sources