By Tim King · Updated
File Type Identifier
Magic Byte Sniffing With Warnings for Disguised Programs and Double Extensions
OneTask is free, with no sign-up, and built by one person.
If this tool saved you time, a coffee helps keep new ones coming.
How the File Type Identifier works
This file type identifier reads the first bytes of a file to tell you what it really is, whatever the name says. Drop in an attachment or download you are unsure about and it flags fake or double extensions and programs dressed up as a PDF, photo or invoice.
How the file type identifier works
Most formats start with a fixed signature, often called a magic number. A PDF begins with %PDF, a PNG with the bytes 89 50 4E 47, a Windows program with MZ and a zip with PK. The tool compares the start of your file with more than fifty signatures, then checks whether the result fits the extension in the name.
A mismatch is not always dangerous, as a .docx really is a zip, but some are serious. A file called invoice.pdf that starts with MZ is a program, and opening it runs it. The tool also warns about names such as report.pdf.exe, long runs of spaces that push the real extension out of sight, and invisible right-to-left characters that make exe.pdf appear on screen when the file ends in .exe.
Only the first 40 KB is read, in your browser, and nothing is uploaded. A matching type tells you the file is what it claims to be, not that it is safe, so a genuine Office file can still carry macros.
FAQ
Is the file uploaded or opened?
No. The page reads the first 40 KB as raw bytes in your browser and never runs or renders it. That makes it safe to check a suspicious attachment, as long as you do not open the file afterwards.
Why does my .docx show as a zip archive?
Word, Excel and PowerPoint files, along with .jar, .apk and .epub, are zip archives with a set layout inside. The tool knows which extensions use zip, so these show as a match rather than a warning.
What does unknown binary format mean?
The first bytes did not match any signature the tool knows and the content is not plain text. The file may be a rare or proprietary format, encrypted, or damaged. Treat an unexpected unknown file with caution.
Can a file fake its first bytes?
Yes, some files are valid in two formats at once. This tool catches the common tricks used in phishing emails, but it is not a virus scanner, so still scan anything you do not trust before opening it.
See also: all Security & Identifiers tools, Dev Utilities, Formatters & Validators, Data & Encoding, SEO, Accessibility, AI.
Related tools
MIME Type Lookup
Look up the MIME type for an extension, or the reverse.
Hex Dump Viewer
View any file as hex and ASCII, with type detection and entropy.
Office Metadata Remover
Strip author, company and hidden properties from Word, Excel and PowerPoint files.
Secret Scanner
Find leaked API keys, tokens and passwords in pasted code.
.env File Checker
Lint a .env file for syntax errors, duplicates and weak secrets.