Skip to main content
Byte Array Tools

File Signature (Magic Number) Checker

Identify a file's real type from its first bytes (its magic number) and check whether the extension matches - PNG, JPEG, PDF, ZIP, EXE and more. Only 512 bytes are read.

Find out what a file really is, whatever its name says - the tool reads only its first 512 bytes, in your browser.

Drag & drop a file here, or click to choose

Only the first 512 bytes are read - any file size works

The file is read by your browser and never uploaded. A matching signature does not mean a file is safe to open.

A matching signature tells you the format, not whether the file is safe - scan unknown files with antivirus software before opening them.

What Is the File Signature Checker?

Most file formats start with a fixed sequence of bytes called a signature or magic number: PNG files start with 89 50 4E 47, PDFs with %PDF, ZIP files with PK. This tool reads the first 512 bytes of a file, identifies the real format from the signature and tells you whether the file's extension matches.

When to Use It

  • A file will not open and you suspect the extension is wrong.
  • Checking that an upload really is an image or a PDF before your own code accepts it.
  • Identifying a file with no extension, such as a download or an email attachment.

How to Use It

  1. Drop a file on the box, or paste its first bytes in hex.
  2. Read the detected type, the usual extensions and MIME type, and the extension check.

Example

The bytes 25 50 44 46 2D 31 2E 37 are identified as a PDF document (%PDF-1.7). A PNG image renamed to photo.jpg is detected as PNG image with a warning that the .jpg extension does not match the content.

Understanding the Output

Some signatures cover a family of formats: DOCX, XLSX, PPTX, JAR, APK and EPUB are all ZIP archives inside, and MP4, MOV and HEIC share the ISO media signature, so the tool lists every extension that fits. Plain text files have no signature and are recognised only roughly.

Limitations

A signature identifies the format, not whether the file is safe - scan unknown files before opening them. Only common formats are recognised. The file is read in your browser and never uploaded. To see more than the first bytes, open the file in the Hex Viewer.

Frequently Asked Questions

A fixed sequence of bytes at the start of a file that identifies its format. For example, PNG files start with 89 50 4E 47 0D 0A 1A 0A, PDF files with %PDF and ZIP files with PK (50 4B 03 04). Programs use it to recognise files regardless of their name.

DOCX, XLSX, PPTX, ODT, EPUB, JAR and APK files are all ZIP archives containing XML and other files, so they share the ZIP signature. The tool lists these extensions as matching.

No. The signature only tells you the format. A real PDF or Office file can still contain harmful content. Scan files from unknown sources with antivirus software before opening them.

No. Only the first 512 bytes are read, in your browser, so files of any size are checked instantly and nothing is uploaded.
Share this tool: