How to use the File Type Checker
- Choose a file.
- Read the detected type and MIME type.
- Check the warning if the extension doesn't match.
What does this tool do?
Most file formats start with a recognizable signature, called a “magic number” — PDFs begin with %PDF and PNGs with a fixed 8-byte header. The checker reads only the first few kilobytes and compares them against dozens of known signatures.
How to read the answer
Detection looks at the first 4 KB of the file only. For binary formats it checks fixed signatures such as the PNG header, %PDF-, MZ for Windows programs and the 0x7F ELF marker for Linux programs. A file with no known signature but mostly printable text is reported as plain text, or as JSON, HTML, XML or SVG if it starts that way.
Some formats share a container. DOCX, XLSX, PPTX, EPUB, JAR and APK files are all ZIP archives inside, and old DOC, XLS and PPT files share one signature, so the tool reports the container and does not warn when the extension is one of those. The same goes for M4A and M4V, which are reported as MP4.
Related: File checksum · TAR file creator · Image metadata viewer
What this check cannot tell you
A matching signature does not mean a file is safe. A real PDF or Office document can still contain harmful content, and a file that opens with a known signature can have anything after it. Treat this as a quick way to catch a wrongly named file, not as an antivirus scan. If the result says Unknown binary file, the format is simply not in the tool's list.
Only the first few kilobytes leave the disk and nothing is uploaded. Text files that happen to start with { or [ are reported as JSON even if they are JavaScript, since the two cannot be told apart from the start.
Why use it?
- Open files with no extension.
- Spot programs disguised as documents.
- Debug upload errors caused by wrong file types.
Worked example: three files that are not what their name says
The result panel shows the detected type, the type your system reports, the file name, and the first 16 bytes in hex. A warning appears when the extension does not fit the contents.
| File name | First bytes | Detected as |
|---|---|---|
| invoice.pdf | 4d 5a … (“MZ”) | Windows program (EXE/DLL), with a mismatch warning and a “this is a program” notice |
| photo.jpg | 89 50 4e 47 0d 0a 1a 0a | PNG image: a PNG renamed .jpg, still a mismatch warning |
| report | 25 50 44 46 2d … (“%PDF-”) | PDF document, even though the file has no extension |
| budget.xlsx | 50 4b 03 04 | ZIP archive: expected, since Office files are zips, so no warning |
Privacy
Your files are processed entirely in your browser using built-in web technologies. They are not uploaded to our servers, and closing the page clears them from memory. There's no account to create and nothing to install.
Frequently asked questions
Are my files uploaded?
No. Files are read and processed in your browser, and results are saved straight back to your device.
Can a file's extension be wrong?
Yes. Renaming a file doesn't change its contents, so a file called photo.jpg can really be a PDF, an archive or a program. That's why checking the signature is more reliable.
Content last updated . See how M2Toolkit works.