66

AVIF file signature

Magic number at offset 4 · ftypavif

66 74 79 70 61 76 69 66

AVIF is an ISO Base Media file whose ftyp box (at offset 4) declares the major brand avif at offset 8. It is a single AV1 keyframe wrapped in the same container family as HEIC and MP4.

Hex signature
66 74 79 70 61 76 69 66
Offset
4 bytes
ASCII
ftypavif
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 61 76 69 66 (the text ftypavif), it is a AVIF file.

Formats that use the 66 74 79 70 signature

These file types in our database carry this signature:

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.avif
  • hexdump -C -s 4 -n 8 example.avif
  • file example.avif

Windows (PowerShell)

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

Python

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

In your browser

Frequently asked questions

What is the AVIF file signature?

AVIF files carry, at offset 4, the hex bytes 66 74 79 70 61 76 69 66 (ftypavif 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.avif on Linux or macOS, or Format-Hex -Path example.avif -Count 16 in Windows PowerShell, and read the first bytes.

Can a file fake the AVIF signature?

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

Related signatures

Sources