Security

File Magic Number Inspector

Do not trust a file extension. Drop one or more files to compare their first bytes with known signatures, spot renamed or disguised files and see the raw bytes. Files are only read here; nothing is uploaded or run.

Guide: File Magic Numbers: Spot a Renamed or Disguised File

Your files never leave this page. Nothing is uploaded, sent to a server, stored or run. Only the first and last 64 KiB of each file are read, so even very large files are checked instantly.

Drag and drop one or more files here, or choose them. Up to 200 files at a time.

Ready. Choose a file or drop one here. Nothing is uploaded.

What this tool tells you

  • Signature match: the first bytes (the "magic number") are compared with about 150 signatures such as PNG, JPEG, GIF, PDF, ZIP, GZIP, RAR, 7z, ELF, WebP, MP3, WAV, MP4, SQLite and WebAssembly.
  • Wording matters: "Signature matches PNG" means the bytes at the start look like a PNG. It does not mean the file is a valid, complete or safe PNG.
  • Header consistency: for common formats the tool also reads a few header fields and end markers (for example PNG chunk checksums or the ZIP central directory) and reports whether they are consistent. This is a light check, not a full validation.
  • Extension check: compares the extension and the browser-reported MIME type with what the content suggests, and warns about renamed files, for example a program saved as .jpg.
  • Office and archive types: ZIP-based files are told apart (DOCX, XLSX, PPTX, JAR, APK, EPUB, ODF) from their file lists.
  • Text: files with no signature may be guessed as JSON, HTML, XML, SVG, CSV, Markdown or plain text from their content. This is a heuristic.

Confidence

Confidence reflects how many fixed bytes the signature has and whether the header fields agree. Short or common patterns (such as MZ or BM) are marked as weak hints.

Send to another tool

After inspection you can open the file in the Hex Viewer, send images to the Image Metadata Viewer, Image Compressor or Image to Base64, and send small text-like files to the matching formatter or viewer. Files are held in your browser for under a minute for the next tool, then deleted.

Privacy and safety

Files are read with the browser's file API and never uploaded, parsed by a remote service or executed. The reports you can download (JSON or CSV) are created in your browser.

Limits

  • Only the first and last 64 KiB are read, so a ZIP's type may be unknown when its file list is larger than that.
  • Old Office files (DOC, XLS, PPT) and MSI share one container format and cannot be told apart.
  • A matching signature is not proof of a valid or safe file. Treat unknown files with care.

Three examples

  • A renamed file. A file called photo.jpg that starts with the bytes 89 50 4E 47 0D 0A 1A 0A is detected as a PNG image, and the extension check says: “Mismatch: the extension .jpg normally means JPEG image, but the content matches PNG image. The file may have been renamed or mislabelled.”
  • A ZIP-based document. A file called report.docx that starts with 50 4B 03 04 is a ZIP container, and that is consistent with .docx, because Word documents are ZIP files. The tool still adds notes: the file list does not look like a Word document, and the header checks failed because the end-of-central-directory record is missing.
  • An unknown file. data.bin with the bytes 01 02 03 04 05 06 07 08 matches nothing in the database of 141 signatures, and the tool says that .bin is a generic extension that does not reveal the content.

The result also shows the first bytes in hexadecimal and ASCII, a ranked list of signature matches with their strength, and links to open the same file in the Hex Viewer or the Image Metadata Viewer. Short signatures of two or three bytes can occur by chance, which is why a match is labelled low, medium or high.

Frequently asked questions

Does a match prove that the file is safe or intact?

No. The tool compares the first bytes and some header fields with known patterns. It cannot prove that a file is complete, uncorrupted, safe, or exactly what it claims to be.

Why does my .docx or .xlsx show as a ZIP?

Office documents, OpenDocument files, Java and Android packages are ZIP files with a particular layout, so their first bytes are the ZIP signature.

Is my file uploaded?

No. Only the beginning and the end of the file are read, in your browser, and nothing is sent anywhere. If you open the file in another tool, it is handed over inside your browser.

Share this tool

Your data is not included in this link.