File extension vs file type
A file extension is the label after the last dot. A file type is what the bytes inside actually represent. Most of the time the two agree; when they do not, the bytes win. This page explains why and how to spot the difference in under a minute.
- Plain-English explainer
- 4 verdicts covered
- Bytes never leave your browser
Key facts
Extension
The trailing label after the last dot in a filename. Trivial to change. A hint, not a contract.
File type
The format identified by the bytes inside the file. Detected by reading the first few bytes (the magic-byte signature).
When they diverge
When someone renames the file, when an extension was never set, or when the file is a polyglot (valid as more than one format at once).
How we report it
Four verdicts: MATCH, MISMATCH, AMBIGUOUS, UNKNOWN. Each is a deterministic answer about format identity.
A file extension is the trailing piece of a filename, like .pdf or .docx. The file type is what the bytes actually represent. The two usually match, but they do not have to.
Why they diverge
Anyone can rename a file. invoice.exe renamed to invoice.pdf still has the bytes of a Windows executable; only the label changed. Your operating system shows a PDF icon, but double-clicking would launch the executable anyway (or a security tool would block it). The extension is cheap and lies easily.
The file type is determined by the bytes themselves, the magic-byte signature at the start of the file. We have a longer explainer at What is a magic number?.
How to tell which is right
- MATCH
Extension and bytes agree. The reassuring case.
- MISMATCH
Extension says one thing, bytes say another. Slow down before opening.
- AMBIGUOUS
Multiple known formats fit the same prefix (e.g. every Office document is a ZIP).
- UNKNOWN
No recognised signature. Often plain text; we then run an AI content classifier on desktop.
Frequently asked questions
Drop a file and see the verdict
The check runs locally in your browser. One of four verdicts in under a second. The bytes never leave your device.
Open the File Type CheckerRelated reading
Pillar
What is a magic number?
A magic number is a fixed byte sequence at the start of a file that identifies its true format, regardless of the extension. Here is how they work and why they matter.
Read →Pillar
Is my file safe?
A magic-byte check identifies the file format. It cannot tell you whether the file is malicious. Here is what it does cover, and where you still need a real malware scanner.
Read →Tool
File Type Checker
Drop any file. Returns one of four verdicts in under a second. Bytes never leave your browser on the free flow.
Try it →