Logo

MonoCalc

/

File Signature Checker

Encode/Decode

Drop any file here or click to browse

Only the first 512 bytes are read — nothing is uploaded to any server

About This Tool

🔍 File Signature Checker – Detect True File Types with Magic Bytes

Every file format has a secret identity hidden in its first few bytes — known as magic bytes or a file signature. The File Signature Checker reads those raw bytes and matches them against a database of 80+ known formats to reveal the actual file type, regardless of what the filename or extension claims.

Why File Extensions Can Lie

File extensions are just labels — any user or program can rename malware.exe to photo.jpg. Email clients, web servers, and antivirus filters that rely solely on extensions can be fooled. Magic bytes, on the other hand, are baked into the binary structure of the file itself and are almost always present in legitimate files.

Common scenarios where extension mismatches occur:

  • Malware camouflage — executables renamed to image or document extensions to bypass upload filters
  • Accidental saves — software saved in a different format than the extension suggests
  • Legacy conversions — files converted but not renamed
  • Data pipeline debugging — unknown binary blobs with no extension

How Magic Bytes Work

File format designers reserve the first few bytes for a fixed "magic" value. Here are some well-known examples:

FormatMagic Bytes (hex)ASCII
JPEGFF D8 FFÿØÿ
PNG89 50 4E 47 0D 0A 1A 0A‰PNG\r\n\x1A\n
PDF25 50 44 46 2D%PDF-
ZIP / DOCX / APK50 4B 03 04PK\x03\x04
Windows EXE / DLL4D 5AMZ
ELF (Linux binary)7F 45 4C 46\x7FELF
SQLite Database53 51 4C 69 74 65 20 66 6F 72 6D 61 74 20 33 00SQLite format 3\0

Some Signatures Are at Non-Zero Offsets

Not all magic bytes start at byte 0. For example, ISO 9660 disk images store their signature (CD001) at byte offset 32769, and TAR archives place ustar at offset 257. This tool scans multiple offsets to catch these cases.

Understanding the Results

When a match is found, the tool displays the format name, MIME type, common extensions, and a plain-language description. The tool also shows the raw hex bytes of the file header so you can visually inspect them. A ⚠️ Extension Mismatch warning appears if the uploaded file's extension does not match any of the extensions expected for the detected format.

Manual Hex Input

You don't always have the file on hand. If you already have the first bytes as a hex string (from a forensics report, a network packet, or a hex editor), paste them directly into the Hex Input tab. The tool accepts multiple formats:

FF D8 FF E0          (space-separated)
FFD8FFE0             (no spaces)
ff d8 ff e0          (lowercase)
0xFF,0xD8,0xFF,0xE0  (0x prefixed, comma-separated)

Security Considerations

This tool runs entirely in your browser — your files are never uploaded to any server. The FileReader API reads only the first 64 bytes needed for signature detection; no file content leaves your device.

While magic-byte detection is a powerful first-pass triage technique, it should be combined with antivirus scanning, hash verification, and full content analysis for security-critical workflows. Sophisticated exploits can embed a valid-looking header while hiding a payload later in the file.

Use Cases

  • Security triage — quickly flag suspicious files before opening them
  • Forensic analysis — identify files recovered from disk images or network captures with missing extensions
  • Developer tooling — validate file types in upload handlers or data pipelines without relying on MIME type headers sent by clients
  • Education — learn how binary file formats are structured at the byte level

Frequently Asked Questions

Is the File Signature Checker free?

Yes, File Signature Checker is totally free :)

Can I use the File Signature Checker offline?

Yes, you can install the webapp as PWA.

Is it safe to use File Signature Checker?

Yes, any data related to File Signature Checker only stored in your browser (if storage required). You can simply clear browser cache to clear all the stored data. We do not store any data on server.

What are magic bytes and file signatures?

Magic bytes are fixed byte sequences at the very beginning (or a specific offset) of a file that uniquely identify its format. Operating systems and security tools use these signatures — not file extensions — to determine the true type of a file. For example, every JPEG starts with FF D8 FF, and every PDF starts with 25 50 44 46 (%PDF).

How does the File Signature Checker work?

Upload any file or paste raw hex bytes manually. The tool reads the first 32 bytes of the file entirely in your browser using the FileReader API — nothing is ever sent to a server. It then compares those bytes against a database of 80+ known signatures and returns all matching file types along with their MIME types and common extensions.

Why would a file's extension not match its signature?

File extensions can be changed or faked intentionally (e.g., renaming a .exe to .jpg to bypass filters) or accidentally (e.g., an incorrect save dialog). Malware authors frequently disguise executables as images or documents. This tool detects those mismatches by comparing the extension against what the actual bytes reveal.

Can I use this tool for security analysis?

Yes. This tool is useful for quick triage of suspicious files — if a file claims to be an image but its magic bytes reveal it is a Windows executable (MZ header), that is a red flag. For deeper forensic analysis, combine this with a full hex dump viewer and hash verification.

What if no signature is detected?

A 'no match' result means either the file format is not in the current signature database, the file is raw binary data with no standard header (e.g., encrypted data, random noise, or a custom format), or the file is empty. The raw hex bytes are always shown so you can inspect them manually.

How accurate is signature-based file type detection?

Signature detection is highly reliable for standard formats but is not foolproof. A file can be crafted to have valid magic bytes while containing malicious content after the header. Always combine signature checking with content scanning for security-critical workflows.