File Type Checker
Detect a file's real format by inspecting its magic-number byte signature — not its extension or the browser-reported MIME type. Catches mislabeled or renamed files (a .zip that's really a .png, a .txt that's really a PDF) by checking the actual bytes against published signatures for PNG, JPEG, GIF, PDF, ZIP/DOCX/XLSX/PPTX, GZIP, BMP, WEBP, WAV, ELF, MP3, 7-Zip and RAR.
Input
The file is read locally in your browser and never uploaded. Only its first few thousand bytes are inspected.
Output
| Property | Value |
|---|---|
| No data yet | |
Guides
A file's extension and its "browser-reported" MIME type are just labels — anyone (or anything) can rename photo.exe to photo.jpg, and most software will happily trust the name. The File Type Checker doesn't. It reads the file's actual first bytes and compares them against the published magic-number signature every major format writes at (or near) the start of the file, then reports what the file really is — flagging a mismatch if that disagrees with the label the browser handed it.
How to use it
Drop a file into the uploader. Detection runs immediately, entirely in your browser — the file is read locally and never uploaded anywhere. The result table shows:
- Detected File Type and Detected MIME Type — what the byte signature actually indicates.
- Confidence — how strong that signal is (see below).
- Typical Extension(s) for the detected format.
- Signature Bytes Matched and Detection Basis — the exact hex bytes examined and which rule matched them, so you can verify the call yourself instead of taking it on faith.
- First Bytes Inspected (hex) — a raw hex dump of the start of the file, shown regardless of whether anything matched.
- Browser-Reported MIME (from upload) — the MIME type your browser guessed for the file (usually derived from its extension).
- Mismatch Warning — flags disagreement between the browser's guess and the byte-level detection, which is the whole point of the tool: catching a file that's been renamed or mislabeled.
How detection works
Every format has a fixed byte pattern near the start of the file — a "magic number" — defined by its own specification. The checker looks for, in order: PNG (89 50 4E 47 0D 0A 1A 0A), JPEG (FF D8 FF), GIF87a/GIF89a, PDF (%PDF-), GZIP (1F 8B), ZIP (50 4B 03 04, including the empty- and spanned-archive variants), BMP (BM), WebP and WAV (both RIFF containers, distinguished by the form-type tag at byte offset 8), ELF binaries, MP3 (an ID3v2 tag, or a bare MPEG frame-sync pattern as a weaker fallback), 7-Zip, and RAR (both the legacy and v5+ header variants).
ZIP-based Office formats (DOCX/XLSX/PPTX) get a second pass: since they're all ordinary ZIP archives at the byte level, matching 50 4B 03 04 alone can't tell them apart, or tell them apart from a plain .zip, a .jar, or an .apk. The checker scans the first 8 KB of the archive for the standard internal file paths Office writes (word/document.xml, xl/workbook.xml, ppt/presentation.xml) to upgrade a generic "ZIP archive" result to a specific Office format when it can. If none of those paths show up but [Content_Types].xml (the OOXML manifest) does, it reports "likely Office Open XML, format undetermined" rather than guessing — and a plain ZIP with neither is reported as a generic ZIP archive.
Confidence isn't uniform. A long, unique signature like PNG's 8 bytes or 7-Zip's 6 bytes is reported near 99% — essentially no chance of a coincidental match. Short signatures (BMP's 2-byte BM) score lower, since 2 bytes have real odds of appearing by chance in unrelated data. The bare MP3 frame-sync check (just 11 bits) is flagged as the weakest signal in the set. If nothing matches a known signature, the checker falls back to a text heuristic — if over 90% of the first 1000 bytes are printable characters, it reports "Plain text" at low-to-moderate confidence; otherwise it honestly reports "Unknown."
Why does it say "MISMATCH" for a file I didn't rename?
Some tools and OSes assign a MIME type purely from the file extension without ever checking the content — so a corrupted download, a file saved with the wrong extension by another program, or a genuinely mislabeled file will all trigger the warning. It means the bytes don't match the label, not necessarily that someone renamed it on purpose.
Is my file uploaded anywhere?
No. This tool runs entirely client-side in your browser (it has no API/programmatic access) — the file is read and inspected locally and its contents never leave your device.
Why doesn't it recognize my file format?
Only the formats listed above are checked. Anything else falls through to the plain-text heuristic or is reported as unknown — magic-number detection only covers formats with a documented, stable byte signature, and this tool sticks to a verified subset rather than guessing at undocumented ones.