Digital Forensics · Tools

File Signature Reference

File signatures, also known as magic numbers, play a critical role in file identification and analysis. These unique sequences of bytes are located at the beginning of a file and are typically represented as hexadecimal values. By using file signatures, programs can determine the format and structure of a file, which is essential for proper handling. Having a solid understanding of file signatures can be helpful in various scenarios, such as data recovery efforts, malware analysis, and general file management. With this knowledge, you can work more efficiently and effectively with your digital files.

Searchable table of 156 file signatures

Showing 156 of 156 signatures

  • 38 42 50 53
    .psd
    Adobe Photoshop documentImage
  • 66 74 79 70 61 76 69 66offset 4
    .avif
    AV1 Image File Format (AVIF) imageImage
  • 42 50 47 FB
    .bpg
    Better Portable Graphics (BPG) image fileImage
  • 4D 4D 00 2B
    .tiff, .tif
    BigTIFF image fileImage
  • 49 49 2B 00
    .tif, .tiff
    BigTIFF image file, little-endianImage
  • 42 4D
    .bmp
    Bitmap (BMP) image fileImage
  • FF D8 FF E2 xx xx
    .jpg, .jpeg
    Canon RAW (CR2) image fileImage
  • 4D 4D 00 2A
    .dng
    Digital Negative (DNG) image fileImage
  • 25 21 50 6F 73 74 53 63 72 69 70 74 20 45 50 53
    .eps
    Encapsulated PostScript (EPS) fileImage
  • FF D8 FF E1 xx xx 45 78 69 66 00
    .jpg, .jpeg
    Exif image fileImage
  • 47 49 46 38 39 61
    .gif
    GIF89a image fileImage
  • 67 69 6D 70 20 78 63 66
    .xcf
    GIMP native image (XCF) fileImage
  • 47 49 46 38 37 61
    .gif
    Graphics Interchange Format (GIF) image fileImage
  • 66 74 79 70 68 65 69 63offset 4
    .heic
    High Efficiency Image Container (HEIC) imageImage
  • 00 01 00 00 00
    .ico
    Icon fileImage
  • FF 0A
    .jxl
    JPEG XL bare codestreamImage
  • 00 00 00 0C 4A 58 4C 20 0D 0A 87 0A
    .jxl
    JPEG XL image in ISOBMFF containerImage
  • FF D8 FF E0 xx xx 4A 46 49 46 00
    .jpg, .jpeg
    JPEG/JFIF image fileImage
  • FF D8 FF E0 00 10 4A 46 49 46
    .jpg, .jpeg
    JPEG/JFIF image fileImage
  • 8A 4D 4E 47 0D 0A 1A 0A
    .mng
    Multiple-image Network Graphics (MNG) fileImage
  • 89 50 4E 47 0D 0A 1A 0A
    .png
    Portable Network Graphics (PNG) image fileImage
  • 71 6F 69 66
    .qoi
    Quite OK Image (QOI) fileImage
  • 3C 3F 78 6D 6C 20
    .svg
    Scalable Vector Graphics (SVG) fileImage
  • 3C 73 76 67
    .svg
    Scalable Vector Graphics (SVG), root elementImage
  • 49 49 2A 00
    .tif, .tiff
    Tagged Image File Format (TIFF) image fileImage
  • 4D 4D 00 2A
    .tif, .tiff
    TIFF image file, big-endian (Motorola byte order)Image
  • 52 49 46 46 xx xx xx xx 57 45 42 50
    .webp
    WebP image file (RIFF container)Image
  • 00 00 02 00
    .cur
    Windows cursor fileImage
  • 66 74 79 70 33 67 70offset 4
    .3gp
    3GPP multimedia fileVideo
  • 30 26 B2 75 8E 66 CF 11 A6 D9 00 AA 00 62 CE 6C
    .asf, .wmv
    Advanced Systems Format (ASF)/Windows Media Video (WMV) fileVideo
  • 52 49 46 46 xx xx xx xx 41 56 49 20
    .avi
    Audio Video Interleave (AVI) video fileVideo
  • 46 4C 56 01
    .flv
    Flash video fileVideo
  • 1A 45 DF A3
    .mkv
    Matroska video fileVideo
  • 00 00 01 BA
    .mpg, .vob
    MPEG program streamVideo
  • 00 00 01 B3
    .mpg
    MPEG video elementary streamVideo
  • 66 74 79 70 69 73 6F 6Doffset 4
    .mp4
    MPEG-4 video, ISO Base Media (isom brand)Video
  • 66 74 79 70 71 74 20 20offset 4
    .mov
    QuickTime movie fileVideo
  • 5A 57 53
    .swf
    Shockwave Flash (SWF), LZMA compressedVideo
  • 46 57 53
    .swf
    Shockwave Flash (SWF), uncompressedVideo
  • 1A 45 DF A3
    .webm
    WebM video file (EBML header)Video
  • 30 26 B2 75 8E 66 CF 11 A6 D9 00 AA 00 62 CE 6C
    .wmv
    Windows Media Video (WMV) fileVideo
  • 46 4F 52 4D 00
    .aif, .aiff
    Audio Interchange File Format (AIFF) fileAudio
  • 66 4C 61 43
    .flac
    Free Lossless Audio Codec (FLAC) fileAudio
  • 4D 54 68 64
    .mid, .midi
    MIDI sound fileAudio
  • 4D 41 43 20
    .ape
    Monkey's Audio lossless fileAudio
  • FF FB
    .mp3
    MPEG-1 Layer 3 audio frame, no ID3 tagAudio
  • 49 44 33
    .mp3
    MPEG-1/2 Audio Layer 3 (MP3) fileAudio
  • FF F3
    .mp3
    MPEG-2 Layer 3 audio frame, no ID3 tagAudio
  • 66 74 79 70 4D 34 41 20offset 4
    .m4a
    MPEG-4 audio (AAC) fileAudio
  • 4F 67 67 53
    .ogg, .oga, .opus
    Ogg container (Vorbis, Opus, Theora)Audio
  • 2E 73 6E 64
    .au
    Sun/NeXT audio fileAudio
  • 52 49 46 46 xx xx xx xx 57 41 56 45 66 6D 74 20
    .wav
    Waveform Audio File Format (WAV) fileAudio
  • 52 49 46 46 xx xx xx xx 57 41 56 45
    .wav
    Waveform Audio File Format (WAV) fileAudio
  • 41 43 31 30
    .dwg
    AutoCAD drawing fileDocument
  • 6D 69 6D 65 74 79 70 65 61 70 70 6C 69 63 61 74 69 6F 6E 2F 65 70 75 62 2B 7A 69 70offset 30
    .epub
    EPUB electronic publicationDocument
  • 3C 3F 78 6D 6C 20
    .xml
    Extensible Markup Language (XML) fileDocument
  • 47 4E 55 50
    .gnu
    GNU Info Reader fileDocument
  • 1B 4C 75 61
    .lua
    Lua programming language source code fileDocument
  • 49 54 53 46
    .chm
    Microsoft Compiled HTML Help fileDocument
  • D0 CF 11 E0 A1 B1 1A E1
    .doc, .xls, .ppt
    Microsoft Office fileDocument
  • 50 4B 03 04 14 00 06 00 08 00
    .docx, .xlsx, .pptx
    Office Open XML (OOXML) fileDocument
  • 50 4B 03 04 14 00 02 00 08 00
    .odt, .ods, .odp
    OpenDocument Format (ODF) fileDocument
  • 50 4B 03 04 0A 00 00 00 00 00 3C 3A
    .odt, .ods, .odp
    OpenDocument Format (ODF) fileDocument
  • 25 50 44 46
    .pdf
    Portable Document Format (PDF) fileDocument
  • 25 21 50 53 2D 41 64 6F 62 65
    .ps
    PostScript (PS) fileDocument
  • 25 21 50 53 2D
    .ps
    PostScript (PS) fileDocument
  • 7B 5C 72 74 66 31
    .rtf
    Rich Text Format (RTF) fileDocument
  • 43 57 53
    .swf
    Shockwave Flash (SWF), zlib compressedDocument
  • FF FE
    .txt
    Unicode text fileDocument
  • 00 00 FE FF
    .txt
    UTF-32 big-endian byte order markDocument
  • FF FE 00 00
    .txt
    UTF-32 little-endian byte order markDocument
  • EF BB BF
    .txt
    UTF-8 encoded text fileDocument
  • 37 7A BC AF 27 1C
    .7z
    7-Zip compressed fileArchive
  • 42 5A 68
    .bz2
    Bzip2 compressed fileArchive
  • 47 42 52 20
    .cbr
    Comic Book Archive (CBA, CBZ, CBR, CB7, CBT) fileArchive
  • 1F 9D
    .tar.Z
    Compressed Tarball (compressed using compress)Archive
  • 1F A0
    .tar.Z
    Compressed Tarball (compressed using compress)Archive
  • 1F A3
    .tar.Z
    Compressed Tarball (compressed using compress)Archive
  • 1F B5
    .tar.Z
    Compressed Tarball (compressed using compress)Archive
  • 1F A0 xx
    .tar.Z
    Compressed Tarball (compressed using compress)Archive
  • 1F A3 xx
    .tar.Z
    Compressed Tarball (compressed using compress)Archive
  • 1F B5 xx
    .tar.Z
    Compressed Tarball (compressed using compress)Archive
  • 1F 9D 90
    .tar.Z
    Compressed Tarball (compressed using gzip)Archive
  • 21 3C 61 72 63 68 3E
    .deb
    Debian package fileArchive
  • 23 20 64 65 62 69 61 6E 2D 62 61 73 68
    .deb
    Debian software package fileArchive
  • 43 72 32 34
    .crx
    Google Chrome extension packageArchive
  • 1F 8B 08
    .gz
    Gzip compressed fileArchive
  • 1F 8B 08
    .tar.gz, .tgz
    Gzip compressed Tar archive fileArchive
  • 50 4B 03 04 0A 00 00 00 00 00 9D 5B
    .jar
    JAR archive fileArchive
  • 50 4B 03 04 0A 00 00 00 00 00 20 AF
    .jar
    JAR archive fileArchive
  • FD FF FF
    .jar
    Java Archive (JAR) fileArchive
  • 04 22 4D 18
    .lz4
    LZ4 compressed fileArchive
  • 4D 53 43 46
    .cab
    Microsoft Cabinet archiveArchive
  • 50 4B 4C 49 54 45
    .zip
    PKLITE compressed ZIP archive fileArchive
  • 75 73 74 61 72offset 257
    .tar
    POSIX tar archive (ustar magic)Archive
  • 25 52 41 52 0A 25 50 44 46
    .rar
    RAR archive fileArchive
  • 52 61 72 21 1A 07 01 00
    .rar
    RAR archive, version 5.0 and laterArchive
  • 52 61 72 21 1A 07 00
    .rar
    RAR compressed archive fileArchive
  • 21 3C 61 72 63 68 3E
    .rpm
    RPM package fileArchive
  • 5F 27 A8 89
    .rpm
    RPM package fileArchive
  • 1F 8B 08 00
    .tar
    Tar archive fileArchive
  • 1F 9D
    .Z
    Unix compress (LZW) fileArchive
  • FD 37 7A 58 5A 00
    .xz
    XZ compressed fileArchive
  • 50 4B 05 06
    .zip
    Zip archive fileArchive
  • 50 4B 07 08
    .zip
    Zip archive fileArchive
  • 50 4B 03 04
    .zip
    ZIP archive fileArchive
  • 78 01
    .zlib, .deflate
    zlib compressed fileArchive
  • 28 B5 2F FD
    .zst
    Zstandard compressed fileArchive
  • 64 65 78 0A 30 33
    .dex
    Dalvik Executable (DEX) fileExecutable
  • 7F 45 4C 46
    .elf
    Executable and Linkable Format (ELF) fileExecutable
  • CA FE BA BE
    .class
    Java bytecode class fileExecutable
  • CE FA ED FE
    Mach-O executable, 32-bit little-endianExecutable
  • CF FA ED FE
    Mach-O executable, 64-bit little-endianExecutable
  • CA FE BA BE
    Mach-O universal binary (also Java class, see .class)Executable
  • 23 21
    .sh
    Shell script or other shebang-launched scriptExecutable
  • 00 61 73 6D
    .wasm
    WebAssembly binary moduleExecutable
  • 4D 5A
    .ocx
    Windows ActiveX control fileExecutable
  • 4D 5A
    .cpl
    Windows Control Panel item fileExecutable
  • 4D 5A
    .exe, .dll
    Windows Executable/DLL fileExecutable
  • 4D 5A
    .scr
    Windows screen saver fileExecutable
  • 4D 5A
    .sys
    Windows system driver fileExecutable
  • 4D 5A 90 00 03 00 00 00 04 00 00 00 FF
    .ocx, .dll
    Windows system fileExecutable
  • AC ED 00 05 73 72 00
    .ser
    Java Serialized Object fileDatabase
  • 00 01 00 00 53 74 61 6E 64 61 72 64 20 4A 65 74 20 44 42
    .mdb
    Microsoft Access (Jet) databaseDatabase
  • 00 01 00 00 53 74 61 6E 64 61 72 64 20 41 43 45 20 44 42
    .accdb
    Microsoft Access 2007 and later databaseDatabase
  • 21 42 44 4E
    .pst
    Microsoft Outlook personal folder fileDatabase
  • 5F 27 A8 89
    .db
    SQLite database fileDatabase
  • 37 E4 53 96 C9 DB D6 3C
    .sqlite
    SQLite database fileDatabase
  • 53 51 4C 69 74 65 20 66 6F 72 6D 61 74 20 33 2E
    .sqlite3
    SQLite3 database fileDatabase
  • 52 61 64 69 75 73 20 53 65 65 64 66 69 6C 65
    .dat
    WinNT Registry / Windows 2000 Registry HiveDatabase
  • 41 46 46
    .aff
    Advanced Forensic Format disk imageForensic & Disk
  • 4D 56
    .mbox
    Email mailbox fileForensic & Disk
  • 45 56 46 09 0D 0A FF 00
    .e01
    EnCase EWF forensic disk imageForensic & Disk
  • 43 44 30 30 31offset 32769
    .iso
    ISO 9660 CD/DVD image (CD001 magic)Forensic & Disk
  • A1 B2 C3 D4
    .pcap
    libpcap network capture, big-endianForensic & Disk
  • D4 C3 B2 A1
    .pcap
    libpcap network capture, little-endianForensic & Disk
  • 63 6F 6E 65 63 74 69 78
    .vhd
    Microsoft Virtual Hard Disk (VHD)Forensic & Disk
  • 76 68 64 78 66 69 6C 65
    .vhdx
    Microsoft Virtual Hard Disk v2 (VHDX)Forensic & Disk
  • 0A 0D 0D 0A
    .pcapng
    PCAP Next Generation network captureForensic & Disk
  • 51 46 49 FB
    .qcow
    QEMU QCOW disk imageForensic & Disk
  • 00 01 42 44
    .vmdk
    Virtual Machine Disk (VMDK) fileForensic & Disk
  • 3C 3C 3C 20 4F 72 61 63 6C 65 20 56 4D 20 56 69 72 74 75 61 6C 42 6F 78
    .vdi
    VirtualBox virtual disk imageForensic & Disk
  • 72 65 67 66
    Windows registry hive (regf)Forensic & Disk
  • 4C 01
    .lnk
    Windows Shortcut fileForensic & Disk
  • 45 6C 66 46 69 6C 65 00
    .evtx
    Windows XML event logForensic & Disk
  • 4F 54 54 4F
    .otf
    OpenType font with CFF outlinesFont
  • 74 74 63 66
    .ttc
    TrueType font collectionFont
  • 00 01 00 00 00
    .ttf
    TrueType font fileFont
  • 00 01 00 00 00
    .ttf, .otf
    TrueType/OpenType font fileFont
  • 77 4F 46 46
    .woff
    Web Open Font Format (WOFF)Font
  • 77 4F 46 32
    .woff2
    Web Open Font Format 2 (WOFF2)Font
  • FF F1
    .aac
    AAC audio in ADTS containerSecurity & Other
  • 64 38 3A 61 6E 6E 6F 75 6E 63 65
    .torrent
    BitTorrent metainfo fileSecurity & Other
  • 30 82
    .der, .cer
    DER-encoded X.509 certificateSecurity & Other
  • 3C 21 44 4F 43 54 59 50 45
    .html, .htm
    HTML document (DOCTYPE declaration)Security & Other
  • 2D 2D 2D 2D 2D 42 45 47 49 4E
    .pem, .crt, .key
    PEM encoded certificate or key (ASCII '-----BEGIN')Security & Other

xx marks a byte that varies between files, usually a length or size field. Where a signature does not begin at the start of the file, the byte offset is shown next to it.

How to read a file signature

Open the file in a hex editor and read the first few bytes. A PDF begins 25 50 44 46, which is %PDF in ASCII. A PNG begins 89 50 4E 47 0D 0A 1A 0A, where bytes two to four spell PNG and the rest guard against corruption during transfer.

Two details catch people out. Some signatures do not start at byte 0, so the offset matters: the ISO 9660 CD001 magic sits at 32769 and the tar ustar magic at 257. And a signature identifies a container, not always a format. Everything built on ZIP, from DOCX to APK to EPUB, opens with 50 4B 03 04, so the contents decide which it is.

Where this is used

File type verification
An extension is only a label. When the signature disagrees with it, the file has been renamed, deliberately or otherwise, and that mismatch is itself evidence worth documenting.
File carving and data recovery
When the file system is gone, recovery tools scan raw sectors for known headers and, where the format has one, footers. The quality of that carve depends directly on the signature set behind it.
Malware analysis
Payloads are routinely disguised with a harmless extension or padded to look like a document. Reading the header is the first triage step before anything is executed.
Data triage at scale
On a large exhibit, grouping by real signature rather than by extension gives a truthful picture of what is actually present before deeper analysis begins.

Frequently asked questions

What is a file signature?
A file signature, also called a magic number, is a short fixed sequence of bytes at the beginning of a file that identifies its format. It is normally written as hexadecimal, for example 25 50 44 46 for a PDF, which reads as %PDF in ASCII.
Why do file signatures matter in digital forensics?
Extensions can be renamed, but the signature sits inside the file itself. Comparing the two exposes a file whose extension does not match its real format, which is a common way of hiding data. Signatures also drive file carving, where deleted files are recovered from unallocated space by locating their headers.
Can a file signature be faked?
Yes. A header can be edited, so a signature match alone is not proof of format. Examiners confirm the finding against the file's internal structure, its footer where one exists, and whether the file parses correctly in a reader for that format.
What does xx mean in a hex signature?
It marks a byte that changes from file to file, usually part of a length or size field. Those positions should be treated as wildcards when matching.
Do all signatures start at the beginning of the file?
No. Most begin at byte 0, but some do not: the ISO 9660 CD001 magic sits at offset 32769, the tar ustar magic at offset 257, and MP4 or HEIC ftyp brands at offset 4. This table lists the offset wherever it is not zero.
Can two formats share the same signature?
They can. CA FE BA BE is both a Java class file and a Mach-O universal binary, and every ZIP-based format, including DOCX, XLSX, PPTX, ODF, JAR, APK, and EPUB, begins with PK 03 04. Distinguishing them needs the container's internal contents.