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.psdAdobe Photoshop documentImage
- 66 74 79 70 61 76 69 66offset 4.avifAV1 Image File Format (AVIF) imageImage
- 42 50 47 FB.bpgBetter Portable Graphics (BPG) image fileImage
- 4D 4D 00 2B.tiff, .tifBigTIFF image fileImage
- 49 49 2B 00.tif, .tiffBigTIFF image file, little-endianImage
- 42 4D.bmpBitmap (BMP) image fileImage
- FF D8 FF E2 xx xx.jpg, .jpegCanon RAW (CR2) image fileImage
- 4D 4D 00 2A.dngDigital Negative (DNG) image fileImage
- 25 21 50 6F 73 74 53 63 72 69 70 74 20 45 50 53.epsEncapsulated PostScript (EPS) fileImage
- FF D8 FF E1 xx xx 45 78 69 66 00.jpg, .jpegExif image fileImage
- 47 49 46 38 39 61.gifGIF89a image fileImage
- 67 69 6D 70 20 78 63 66.xcfGIMP native image (XCF) fileImage
- 47 49 46 38 37 61.gifGraphics Interchange Format (GIF) image fileImage
- 66 74 79 70 68 65 69 63offset 4.heicHigh Efficiency Image Container (HEIC) imageImage
- 00 01 00 00 00.icoIcon fileImage
- FF 0A.jxlJPEG XL bare codestreamImage
- 00 00 00 0C 4A 58 4C 20 0D 0A 87 0A.jxlJPEG XL image in ISOBMFF containerImage
- FF D8 FF E0 xx xx 4A 46 49 46 00.jpg, .jpegJPEG/JFIF image fileImage
- FF D8 FF E0 00 10 4A 46 49 46.jpg, .jpegJPEG/JFIF image fileImage
- 8A 4D 4E 47 0D 0A 1A 0A.mngMultiple-image Network Graphics (MNG) fileImage
- 89 50 4E 47 0D 0A 1A 0A.pngPortable Network Graphics (PNG) image fileImage
- 71 6F 69 66.qoiQuite OK Image (QOI) fileImage
- 3C 3F 78 6D 6C 20.svgScalable Vector Graphics (SVG) fileImage
- 3C 73 76 67.svgScalable Vector Graphics (SVG), root elementImage
- 49 49 2A 00.tif, .tiffTagged Image File Format (TIFF) image fileImage
- 4D 4D 00 2A.tif, .tiffTIFF image file, big-endian (Motorola byte order)Image
- 52 49 46 46 xx xx xx xx 57 45 42 50.webpWebP image file (RIFF container)Image
- 00 00 02 00.curWindows cursor fileImage
- 66 74 79 70 33 67 70offset 4.3gp3GPP multimedia fileVideo
- 30 26 B2 75 8E 66 CF 11 A6 D9 00 AA 00 62 CE 6C.asf, .wmvAdvanced Systems Format (ASF)/Windows Media Video (WMV) fileVideo
- 52 49 46 46 xx xx xx xx 41 56 49 20.aviAudio Video Interleave (AVI) video fileVideo
- 46 4C 56 01.flvFlash video fileVideo
- 1A 45 DF A3.mkvMatroska video fileVideo
- 00 00 01 BA.mpg, .vobMPEG program streamVideo
- 00 00 01 B3.mpgMPEG video elementary streamVideo
- 66 74 79 70 69 73 6F 6Doffset 4.mp4MPEG-4 video, ISO Base Media (isom brand)Video
- 66 74 79 70 71 74 20 20offset 4.movQuickTime movie fileVideo
- 5A 57 53.swfShockwave Flash (SWF), LZMA compressedVideo
- 46 57 53.swfShockwave Flash (SWF), uncompressedVideo
- 1A 45 DF A3.webmWebM video file (EBML header)Video
- 30 26 B2 75 8E 66 CF 11 A6 D9 00 AA 00 62 CE 6C.wmvWindows Media Video (WMV) fileVideo
- 46 4F 52 4D 00.aif, .aiffAudio Interchange File Format (AIFF) fileAudio
- 66 4C 61 43.flacFree Lossless Audio Codec (FLAC) fileAudio
- 4D 54 68 64.mid, .midiMIDI sound fileAudio
- 4D 41 43 20.apeMonkey's Audio lossless fileAudio
- FF FB.mp3MPEG-1 Layer 3 audio frame, no ID3 tagAudio
- 49 44 33.mp3MPEG-1/2 Audio Layer 3 (MP3) fileAudio
- FF F3.mp3MPEG-2 Layer 3 audio frame, no ID3 tagAudio
- 66 74 79 70 4D 34 41 20offset 4.m4aMPEG-4 audio (AAC) fileAudio
- 4F 67 67 53.ogg, .oga, .opusOgg container (Vorbis, Opus, Theora)Audio
- 2E 73 6E 64.auSun/NeXT audio fileAudio
- 52 49 46 46 xx xx xx xx 57 41 56 45 66 6D 74 20.wavWaveform Audio File Format (WAV) fileAudio
- 52 49 46 46 xx xx xx xx 57 41 56 45.wavWaveform Audio File Format (WAV) fileAudio
- 41 43 31 30.dwgAutoCAD 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.epubEPUB electronic publicationDocument
- 3C 3F 78 6D 6C 20.xmlExtensible Markup Language (XML) fileDocument
- 47 4E 55 50.gnuGNU Info Reader fileDocument
- 1B 4C 75 61.luaLua programming language source code fileDocument
- 49 54 53 46.chmMicrosoft Compiled HTML Help fileDocument
- D0 CF 11 E0 A1 B1 1A E1.doc, .xls, .pptMicrosoft Office fileDocument
- 50 4B 03 04 14 00 06 00 08 00.docx, .xlsx, .pptxOffice Open XML (OOXML) fileDocument
- 50 4B 03 04 14 00 02 00 08 00.odt, .ods, .odpOpenDocument Format (ODF) fileDocument
- 50 4B 03 04 0A 00 00 00 00 00 3C 3A.odt, .ods, .odpOpenDocument Format (ODF) fileDocument
- 25 50 44 46.pdfPortable Document Format (PDF) fileDocument
- 25 21 50 53 2D 41 64 6F 62 65.psPostScript (PS) fileDocument
- 25 21 50 53 2D.psPostScript (PS) fileDocument
- 7B 5C 72 74 66 31.rtfRich Text Format (RTF) fileDocument
- 43 57 53.swfShockwave Flash (SWF), zlib compressedDocument
- FF FE.txtUnicode text fileDocument
- 00 00 FE FF.txtUTF-32 big-endian byte order markDocument
- FF FE 00 00.txtUTF-32 little-endian byte order markDocument
- EF BB BF.txtUTF-8 encoded text fileDocument
- 37 7A BC AF 27 1C.7z7-Zip compressed fileArchive
- 42 5A 68.bz2Bzip2 compressed fileArchive
- 47 42 52 20.cbrComic Book Archive (CBA, CBZ, CBR, CB7, CBT) fileArchive
- 1F 9D.tar.ZCompressed Tarball (compressed using compress)Archive
- 1F A0.tar.ZCompressed Tarball (compressed using compress)Archive
- 1F A3.tar.ZCompressed Tarball (compressed using compress)Archive
- 1F B5.tar.ZCompressed Tarball (compressed using compress)Archive
- 1F A0 xx.tar.ZCompressed Tarball (compressed using compress)Archive
- 1F A3 xx.tar.ZCompressed Tarball (compressed using compress)Archive
- 1F B5 xx.tar.ZCompressed Tarball (compressed using compress)Archive
- 1F 9D 90.tar.ZCompressed Tarball (compressed using gzip)Archive
- 21 3C 61 72 63 68 3E.debDebian package fileArchive
- 23 20 64 65 62 69 61 6E 2D 62 61 73 68.debDebian software package fileArchive
- 43 72 32 34.crxGoogle Chrome extension packageArchive
- 1F 8B 08.gzGzip compressed fileArchive
- 1F 8B 08.tar.gz, .tgzGzip compressed Tar archive fileArchive
- 50 4B 03 04 0A 00 00 00 00 00 9D 5B.jarJAR archive fileArchive
- 50 4B 03 04 0A 00 00 00 00 00 20 AF.jarJAR archive fileArchive
- FD FF FF.jarJava Archive (JAR) fileArchive
- 04 22 4D 18.lz4LZ4 compressed fileArchive
- 4D 53 43 46.cabMicrosoft Cabinet archiveArchive
- 50 4B 4C 49 54 45.zipPKLITE compressed ZIP archive fileArchive
- 75 73 74 61 72offset 257.tarPOSIX tar archive (ustar magic)Archive
- 25 52 41 52 0A 25 50 44 46.rarRAR archive fileArchive
- 52 61 72 21 1A 07 01 00.rarRAR archive, version 5.0 and laterArchive
- 52 61 72 21 1A 07 00.rarRAR compressed archive fileArchive
- 21 3C 61 72 63 68 3E.rpmRPM package fileArchive
- 5F 27 A8 89.rpmRPM package fileArchive
- 1F 8B 08 00.tarTar archive fileArchive
- 1F 9D.ZUnix compress (LZW) fileArchive
- FD 37 7A 58 5A 00.xzXZ compressed fileArchive
- 50 4B 05 06.zipZip archive fileArchive
- 50 4B 07 08.zipZip archive fileArchive
- 50 4B 03 04.zipZIP archive fileArchive
- 78 01.zlib, .deflatezlib compressed fileArchive
- 28 B5 2F FD.zstZstandard compressed fileArchive
- 64 65 78 0A 30 33.dexDalvik Executable (DEX) fileExecutable
- 7F 45 4C 46.elfExecutable and Linkable Format (ELF) fileExecutable
- CA FE BA BE.classJava 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.shShell script or other shebang-launched scriptExecutable
- 00 61 73 6D.wasmWebAssembly binary moduleExecutable
- 4D 5A.ocxWindows ActiveX control fileExecutable
- 4D 5A.cplWindows Control Panel item fileExecutable
- 4D 5A.exe, .dllWindows Executable/DLL fileExecutable
- 4D 5A.scrWindows screen saver fileExecutable
- 4D 5A.sysWindows system driver fileExecutable
- 4D 5A 90 00 03 00 00 00 04 00 00 00 FF.ocx, .dllWindows system fileExecutable
- AC ED 00 05 73 72 00.serJava Serialized Object fileDatabase
- 00 01 00 00 53 74 61 6E 64 61 72 64 20 4A 65 74 20 44 42.mdbMicrosoft Access (Jet) databaseDatabase
- 00 01 00 00 53 74 61 6E 64 61 72 64 20 41 43 45 20 44 42.accdbMicrosoft Access 2007 and later databaseDatabase
- 21 42 44 4E.pstMicrosoft Outlook personal folder fileDatabase
- 5F 27 A8 89.dbSQLite database fileDatabase
- 37 E4 53 96 C9 DB D6 3C.sqliteSQLite database fileDatabase
- 53 51 4C 69 74 65 20 66 6F 72 6D 61 74 20 33 2E.sqlite3SQLite3 database fileDatabase
- 52 61 64 69 75 73 20 53 65 65 64 66 69 6C 65.datWinNT Registry / Windows 2000 Registry HiveDatabase
- 41 46 46.affAdvanced Forensic Format disk imageForensic & Disk
- 4D 56.mboxEmail mailbox fileForensic & Disk
- 45 56 46 09 0D 0A FF 00.e01EnCase EWF forensic disk imageForensic & Disk
- 43 44 30 30 31offset 32769.isoISO 9660 CD/DVD image (CD001 magic)Forensic & Disk
- A1 B2 C3 D4.pcaplibpcap network capture, big-endianForensic & Disk
- D4 C3 B2 A1.pcaplibpcap network capture, little-endianForensic & Disk
- 63 6F 6E 65 63 74 69 78.vhdMicrosoft Virtual Hard Disk (VHD)Forensic & Disk
- 76 68 64 78 66 69 6C 65.vhdxMicrosoft Virtual Hard Disk v2 (VHDX)Forensic & Disk
- 0A 0D 0D 0A.pcapngPCAP Next Generation network captureForensic & Disk
- 51 46 49 FB.qcowQEMU QCOW disk imageForensic & Disk
- 00 01 42 44.vmdkVirtual 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.vdiVirtualBox virtual disk imageForensic & Disk
- 72 65 67 66—Windows registry hive (regf)Forensic & Disk
- 4C 01.lnkWindows Shortcut fileForensic & Disk
- 45 6C 66 46 69 6C 65 00.evtxWindows XML event logForensic & Disk
- 4F 54 54 4F.otfOpenType font with CFF outlinesFont
- 74 74 63 66.ttcTrueType font collectionFont
- 00 01 00 00 00.ttfTrueType font fileFont
- 00 01 00 00 00.ttf, .otfTrueType/OpenType font fileFont
- 77 4F 46 46.woffWeb Open Font Format (WOFF)Font
- 77 4F 46 32.woff2Web Open Font Format 2 (WOFF2)Font
- FF F1.aacAAC audio in ADTS containerSecurity & Other
- 64 38 3A 61 6E 6E 6F 75 6E 63 65.torrentBitTorrent metainfo fileSecurity & Other
- 30 82.der, .cerDER-encoded X.509 certificateSecurity & Other
- 3C 21 44 4F 43 54 59 50 45.html, .htmHTML document (DOCTYPE declaration)Security & Other
- 2D 2D 2D 2D 2D 42 45 47 49 4E.pem, .crt, .keyPEM 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.