File Type Detector
Identify any file by its magic bytes. See the raw hex signature that reveals the true type.
How it works
File extensions can lie — rename a .exe to .jpg and most operating systems will show a JPEG icon. Magic bytes do not lie. Every binary file format begins with a specific byte sequence (the "magic number") that identifies it: JPEG files start with FF D8 FF, PNG with 89 50 4E 47, PDF with 25 50 44 46, and ZIP with 50 4B 03 04.
This tool reads the first few hundred bytes of your file, matches them against a comprehensive database of known magic byte signatures, and displays the detected MIME type, common file extension, and the actual hex bytes that triggered the match. This is invaluable for forensic analysis, debugging upload validators, or simply figuring out what an unlabeled file actually is.
The detection runs entirely in your browser. Only the first few hundred bytes of the file are read into memory — the rest is never touched. No data is uploaded, making this safe to use on sensitive or classified files.
FAQ
What are magic bytes?
Magic bytes (also called file signatures or magic numbers) are specific byte sequences at the beginning of a file that identify its format. They are more reliable than file extensions because extensions can be changed or removed.
Can this detect a file with no extension?
Yes. The detector relies entirely on the file's content, not its name or extension. Drop a file with no extension and it will identify the type from the binary signature.
What if the file type is not recognized?
If the magic bytes do not match any known signature, the tool displays "Unknown" and shows the first 32 bytes in hex so you can look them up manually.
Can this detect text file encodings (UTF-8, UTF-16)?
It detects BOM (Byte Order Mark) signatures: EF BB BF for UTF-8, FF FE for UTF-16 LE, FE FF for UTF-16 BE. Plain UTF-8 without BOM is detected as generic text.
Is this the same as the Linux file command?
Similar in concept. The Linux file command uses libmagic which has a much larger database and also inspects internal structure. This tool covers the most common ~200 file types by magic bytes.