File Signature Inspector

File extensions are a claim about what a file is; magic bytes are the evidence. Upload a file - or paste the hex from xxd, hexdump or any hex editor - and this inspector reads the first bytes, matches them against a database of 70+ known signatures, and hands back a ranked list of likely file types with confidence scores, the exact offset where each signature matched, and plain-English notes. It goes further than a name match: it sub-identifies ZIP derivatives (DOCX, XLSX, APK, JAR, EPUB…), decodes ELF and PE headers down to bitness and machine type, flags when the filename extension contradicts the bytes, and shows you the hex dump so you can verify every claim.

100% private. This tool runs entirely in your browser - the file is read locally with the FileReader API and never uploaded, and there are no network calls of any kind on this page. What you inspect stays on this machine.

1. What to inspect

Either drop a file in, or paste the leading bytes as hex. The first 16 KB are analyzed - enough for every signature in the database, including ones that live at offset 510.

Drop a file here, or click to choose one.
Read locally in your browser - it is never uploaded.

2. Verdict

The strongest match, with confidence and the evidence behind it.

Nothing analyzed yet - drop a file or paste hex above.

3. All candidates

Every signature that matched, ranked by score. Long and specific matches outrank short ambiguous ones - that is how a PNG beats the MZ heuristic on a file that happens to start with two bytes.

TypeSignature matchedOffsetScoreConfidence
Waiting for input…

4. Hex dump

The analyzed bytes with offset and ASCII columns, so you can check the match against your own eyes.

5. Report

A plain-text summary you can keep with a ticket, a change record or an incident write-up.

Signature database

All signatures the inspector checks, with their magic bytes and offsets. Search by name, extension or hex.

TypeMagic bytesOffsetExtensionsNotes

How to use the File Signature Inspector

The fastest path is the upload tab: drop any file in and the analysis runs on the first 16 KB, read locally by your browser. If you cannot attach the file itself - a log snippet, a packet capture excerpt, or bytes copied out of a hex editor - switch to the hex tab and paste them. Plain hex with or without spaces works, as does complete xxd or hexdump -C output including the offset column and the ASCII gutter; the parser takes the byte field from each line and ignores the rest. The "Load example" button fills in a realistic case: the header of a PNG image that someone renamed with a .pdf extension.

The verdict panel shows the strongest match with its confidence level, the signature that matched and where. The candidates table lists everything else that matched, ranked by score, so you can see why one answer won - a 7-byte PNG header outranks a 2-byte MZ heuristic every time. Below that you get the hex dump of the analyzed bytes (128 to 1024 of them, your choice) with offset and ASCII columns, a copyable and downloadable text report for your records, and the full searchable signature database if you want to learn what the inspector knows rather than just trust it.

Worked example

An email arrives with an attachment named invoice.pdf. You open it and the PDF viewer refuses to render it. Drop the file into the inspector: the top match is a ZIP archive - 50 4B 03 04 ("PK\x03\x04") at offset 0 - but the sub-identification step found two more strings inside the first 16 KB, [Content_Types].xml and a word/ directory entry, so it reports the file as a DOCX (Word document) rather than a plain ZIP. The extension check then adds the explicit warning: the filename says PDF, the bytes say DOCX. Two realistic explanations follow: the sender's tooling mislabeled the file on export, or someone deliberately disguised a Word document - and the same trick works in the other direction, where a .jpg that is really an ELF executable is the classic malware delivery pattern. Either way, the bytes told you what the name was hiding, and the hex dump below the verdict lets you verify the PK marker yourself.

How it works

A magic number (or magic byte signature) is a fixed sequence of bytes at a fixed offset that a format's writer always emits - the PNG header 89 50 4E 47 0D 0A 1A 0A, the ELF marker 7F 45 4C 46, the PDF preamble %PDF-. The inspector keeps a database of more than 70 such signatures and checks every one against your bytes. Each match is scored from three things: how many bytes matched (longer is stronger), how specific the pattern is (a full header beats a two-byte heuristic), and whether the signature lives away from offset zero (finding ustar at byte 257 of a tar file is more distinctive than finding MZ at the start of something). The top score wins the verdict; the rest stay visible as ranked candidates with their confidence labels.

Three formats deserve special treatment, and the inspector applies it. ZIP derivatives: DOCX, XLSX, PPTX, EPUB, ODF, APK, JAR and WAR files all start with PK\x03\x04, so a raw match only says "zip family" - the inspector then scans the sample for directory-entry names (word/, AndroidManifest.xml, META-INF/MANIFEST.MF…) and reports the specific member. ISO Base Media File Format: MP4, MOV, M4A, HEIC and DNG all carry an ftyp box at offset 4, and the four-byte brand that follows names the actual type - the inspector reads it. ELF and PE headers: once \x7fELF or MZ matches, the inspector decodes the rest of the header - bitness, endianness, whether the ELF is a relocatable object, executable or shared library, and which CPU family it targets; for PE files it follows the e_lfanew pointer to confirm the PE\0\0 signature and read the machine type, so "MZ" stops being a guess and becomes "PE32+ executable, AMD x86-64".

Common mistakes when identifying files by signature

  • Trusting the extension. Extensions are user-set metadata, not a format declaration. Malware kits routinely ship payload.exe renamed to photo.jpg or document.pdf, and double extensions like resume.pdf.exe hide in plain sight on Windows where known extensions are hidden by default. The bytes do not lie; the name can.
  • Reading too few bytes. Some signatures live further in than you expect: tar's ustar marker sits at offset 257, the MBR signature table at 510, and PE confirmation requires following a pointer that can sit anywhere in the first kilobyte. Inspecting only the first 16 bytes gives false "unknown" answers for perfectly normal files.
  • Assuming PK\x03\x04 means "just a ZIP". It means the whole OOXML/APK/EPUB/ODF family. Reporting "zip" for a Word document is technically true and practically useless - check the internal names before you answer.
  • Forgetting that signatures change with format versions. GIF87a and GIF89a differ in one byte, RAR5 appends bytes to the classic RAR header, and CPython changes the .pyc magic on every release. A signature database that does not list its version coverage will mislabel files from newer tools.
  • Confusing colliding magics. Mach-O 64-bit binaries and Java class files share the exact same four-byte header (CA FE BA BE); a two-byte GZIP magic matches many unrelated compressed streams. Honest tools report the ambiguity instead of picking one at random - that is why this page shows ranked candidates with confidence levels rather than a single opaque label.
  • Expecting a signature where there is none. Plain text, CSV, Markdown and most scripting languages have no magic bytes at all. "No known signature" is a valid and useful answer - it tells you the file's type must come from its content or context, not its header.
  • Misreading UTF-16 text as binary garbage. A UTF-16LE document starts with FF FE and then alternates real bytes with zeros, which looks like corruption in a naive hex viewer. The inspector lists the BOMs so you can spot the encoding before you "repair" anything.

Privacy

This page is a static document with client-side JavaScript and zero network calls. The file you drop in is read by the browser's FileReader API from local disk, sliced to its first 16 KB, and analyzed in memory on your machine; nothing is transmitted, stored or logged - techgeek.biz never sees the file, its name or its contents. The same holds for pasted hex: it is parsed in the page's JavaScript engine and discarded when you leave. That makes it safe to inspect files you would not want to hand to a third-party "online file type checker", including attachments from unknown senders, forensic samples and proprietary data.


Luke Keam
Spot a bug or want a custom utility built? I'd love to hear from you. Get in touch
Luke Keam | techgeek.biz