Skip to main content
NyankoTools

File Type Detector (Magic Number Checker)

Reads the first bytes of a file (its magic number) to tell you what the file really is, regardless of its extension. If the extension and the contents disagree you get a warning, which helps with renamed files or downloads that saved an HTML error page instead. Files are processed in your browser and are never uploaded. To verify a file has not been modified, use the File Hash Calculator.

🔒 Runs in your browser · Your data is never sent to a server

Drag and drop files here, or pick them with the button.

How to use

  1. Drag and drop the files you want to check into the box, or choose them (multiple allowed).
  2. Each file shows the format detected from its contents and its MIME type.
  3. If the extension and the contents disagree, a warning appears in red.
  4. Open the hex dump to inspect the first 256 bytes.

Notes

  • Only the first part of each file (up to 64 KB) is read for detection. The tool does not verify the whole file or whether it is corrupted.
  • A matching magic number says nothing about whether the contents are malicious. A matching extension does not make a file safe.
  • ZIP-based files (Word, Excel, PowerPoint, EPUB, APK, and so on) are identified from the file names inside the archive. If there is no clue near the start, they are shown as ZIP.
  • Major image, audio, video, archive, document, and executable formats are recognized. Text formats without a marker at the start, such as JSON or CSV, are reported as plain text.

Glossary

Magic number

A fixed byte sequence at the start of a file that identifies its format. A PNG image, for example, begins with 89 50 4E 47. Unlike an extension, it does not change when the file is renamed.

MIME type

An identifier such as "image/png" that describes a file’s type. Web servers and email use it to tell clients what kind of file they are sending.

Extension spoofing

Renaming a file’s extension to disguise it as another type, such as making an executable look like an image or document. Checking the actual format exposes it.

FAQ

Are my files uploaded to a server?

No. The tool reads the start of each file inside your browser and nothing is sent anywhere. It also works offline.

What is a magic number, and how is it different from an extension?

A magic number is a fixed byte sequence at the start of a file that identifies its format. An extension is just part of the file name and is easy to change, whereas the magic number is part of the contents. This tool identifies the real format from the contents.

Can it explain why a downloaded image or PDF will not open?

Often, yes. If a failed download saved an HTML error page as .jpg or .pdf, the contents are detected as HTML and the extension mismatch is flagged. It also reveals files that were only renamed, such as a HEIC photo saved with a .jpg name.

Is a file safe if its extension matches?

No. The tool only checks the format, not whether the contents are safe. Do not open executables or documents from unknown sources even if the extension looks right.

Why is my docx, xlsx, or pptx shown as ZIP?

Office documents are ZIP archives internally. The tool identifies the kind from entry names such as word/, xl/, and ppt/, but if there is no clue near the start of the file it reports ZIP. In that case extensions like .docx and .xlsx are still treated as a match.

Share this page

↑↓ Select Enter Open Esc Close