What is AAAAIGZ0eXBpc29t?

Published

If you work with Base64-encoded videos, you have seen strings like AAAAIGZ0eXBpc29t, AAAAIGZ0eXBtcDQy or AAAAHGZ0eXBNNEEg many times. They are the Base64 form of the first bytes of an MP4 (ISO base media) file.

Decoding the prefix

AAAAIGZ0eXBpc29t decodes to these 12 bytes:

00 00 00 20  66 74 79 70  69 73 6F 6D
└─ size ──┘  └ "ftyp" ──┘  └ "isom" ─┘
  • 00 00 00 20 = 32: the size of the first box (MP4 files are a sequence of boxes).
  • ftyp: the box type, “file type”.
  • isom: the major brand, meaning a generic ISO base media file.

Other brands and box sizes produce close relatives:

Base64 Box size Brand Typical source
AAAAIGZ0eXBpc29t 32 isom FFmpeg, most web MP4s
AAAAIGZ0eXBtcDQy 32 mp42 Cameras, older encoders
AAAAHGZ0eXBNNEEg 28 M4A AAC audio (.m4a)
AAAAFGZ0eXBxdCAg 20 qt QuickTime (.mov)
AAAAGGZ0eXBoZWlj 24 heic iPhone photos (HEIC)

The ftyp marker starts at byte 4, which is not a multiple of 3, so it is not encoded on its own. But because box sizes are multiples of 4, the fragment GZ0eXB appears at the same place in all of them. If a Base64 string starts with AAAA and contains GZ0eXB at position 5, it is an MP4-family file.

Every format has a fingerprint

Files start with a fixed “magic number”, and when it is aligned to a 3-byte boundary its Base64 form is fixed too:

Base64 starts with Bytes Format
iVBORw0KGgo 89 50 4E 47 0D 0A 1A 0A PNG
/9j/ FF D8 FF JPEG
R0lGODlh / R0lGODdh GIF89a / GIF87a GIF
JVBERi0 %PDF- PDF
UEsDB PK\x03\x04 ZIP, DOCX, XLSX, APK
UklGR RIFF WebP, WAV, AVI
SUQz ID3 MP3 with ID3 tag
T2dnUw OggS Ogg audio/video
H4sI 1F 8B 08 Gzip
GkXfo 1A 45 DF A3 WebM / Matroska

See more on our popular Base64 strings page, or let the Base64 to File decoder identify the file for you — it recognises more than 50 formats from their signatures, no matter what file name or MIME type you were given.

Comments (0)

Questions, ideas or a bug in “What is AAAAIGZ0eXBpc29t?”? Leave a comment, rate the tool, or reply to others.

No comments yet. Be the first to share your feedback!

Leave a comment

Rate this tool:
Esc
↑ ↓ move↵ openEsc close