🧬 File Type Detector
Find the real type of any file by reading its magic bytes, even when the extension is wrong or missing.
🔐 Files are read locally with the File API and only the first bytes are inspected. Nothing is uploaded to 0Appz or any third party.
How to use this tool
Overview
File Type Detector reveals what a file really is by reading its magic bytes, the first few bytes that every format uses as a signature. Drop one or many files and get the detected type, real MIME type, suggested extension, file size and a hex preview of the header, plus a match badge that tells you when the extension and the content disagree. That mismatch check is the most useful part: a file named photo.jpg that is actually a PNG, or an .exe disguised as a .pdf, is caught instantly. Everything is read locally through the File API. Only the first 32 bytes are inspected, nothing is uploaded, and the tool keeps working offline after loading.Why magic bytes beat extensions
A file name is just a label a user or a script can change; the first bytes of the content are what actually define the format. The detector reads those signature bytes, matches them against a database of known formats and reports the real type, the MIME type and a suggested extension. When the extension and the content disagree, a warning badge highlights it, the standard symptom of a renamed file, a corrupted download or a disguised executable.
Specifications and compatibility
| Property | File type detector behavior |
|---|---|
| Method | Magic-byte signature matching (first 32 bytes) |
| Returns | Detected type, real MIME, suggested extension, size, hex header preview |
| Mismatch check | Badge when extension and content disagree |
| Batch | Multiple files per run |
| Processing | 100% client-side via the File API; nothing uploaded |
| Offline | Works after the first load |
| Cost | Free, no account, no size limit |
Privacy: files are only sniffed, never read
Only the header bytes are read when checking a file, so even a large document is inspected in milliseconds and its contents never reach a server. Nothing is transmitted, stored or logged, and the page works offline.
When detection is essential
- Verify a download before opening it if the icon looks generic.
- Check received attachments that claim to be PDFs or images.
- Identify an extensionless file recovered from a backup.
- Confirm bulk file renames used the right extension.
- Treat a mismatch as a red flag until proven otherwise.
Related: explore the utility tools for hashing, encoding and metadata inspection.
Magic bytes, MIME types and mismatched extensions
A file extension is a naming convention, not evidence: renaming a .exe to .jpg does not change what the file is. The reliable check is the file signature, often called magic bytes, a short sequence at the start of the file that identifies the format. PDF files begin with %PDF, PNG with a fixed eight-byte header, JPEG with FF D8 FF, ZIP-based formats, including DOCX, XLSX and many others, with PK, and ELF executables with a specific byte pattern. A detector reads these bytes and compares them with the extension, which is how it catches a renamed image, a document with the wrong suffix or a file that only claims to be a certain type. Two complications are worth knowing. First, some formats are containers: a DOCX is a ZIP archive containing XML, so the signature alone tells you it is a ZIP and the internal structure tells you the real type. Second, text files have no magic bytes, and the detector falls back on heuristics, valid UTF-8, printable characters, line endings, which can be wrong for unusual encodings. Checking file types matters for security, because a malicious file often relies on a misleading extension to be opened, and for data hygiene, because batch pipelines that trust extensions corrupt data silently. Everything is inspected locally in your browser.
Frequently asked questions
How does file type detection work? +
The File Type Detector reads the first bytes of the file, the magic number or file signature, and compares them against a table of known formats. This is the same method used by the file command and by browsers, and unlike extensions it cannot lie.
Why does my .jpg show as a PNG? +
That means the file content is a real PNG image but someone renamed it with a .jpg extension. This is common after downloads, exports and manual renaming. The tool flags it as a mismatch so you can rename the file correctly.
Why is my Office document shown as ZIP? +
Modern Office files (docx, xlsx, pptx) are actually ZIP containers with XML inside. The signature is identical to a ZIP archive, so the tool reports ZIP or Office file, open it with a ZIP tool to see the internals.
Are my files uploaded anywhere? +
No. Only the first 32 bytes are read locally via the File API. The content never leaves your browser.