Magic Bytes

Look up file header bytes.

Magic Bytes (File Signatures)

File TypeExtensionHex Signature
JPEG图片.jpgFF D8 FF
PNG图片.png89 50 4E 47
GIF图片.gif47 49 46 38
PDF文档.pdf25 50 44 46
ZIP压缩.zip50 4B 03 04
RAR压缩.rar52 61 72 21
7z压缩.7z37 7A BC AF
PDF文档.pdf25 50 44 46
EXE程序.exe4D 5A
XML文件.xml3C 3F 78 6D
BMP图片.bmp42 4D
WebP图片.webp52 49 46 46
MP3音频.mp349 44 33
MP4视频.mp466 74 79 70

Description

File Signature Detector identifies file types by reading magic bytes (file headers), useful when file extensions are missing or incorrect.

Use Cases

1

Forensics: Identify unknown file types

2

Security: Verify file authenticity

3

Data recovery: Determine file types from raw data

4

Development: Validate file uploads

5

Troubleshooting: Diagnose file format issues

Instructions

1

Upload a file or paste hex bytes

2

View the detected file type

3

See the magic bytes signature

4

Compare with known file signatures

5

Learn about the file format

Notes

  • Magic bytes are the first few bytes of a file
  • Some file types share similar signatures
  • File extensions can be changed but magic bytes cannot
  • Common signatures: PNG (89504E47), JPG (FFD8FF), PDF (25504446)

FAQ

Q

Why are magic bytes important?

A

Magic bytes reliably identify file types regardless of the file extension, which can be changed or lost.

Q

Can I check multiple files?

A

Currently one file at a time is supported. Batch checking may be added later.