The Online File Type Detector is a completely free web tool that automatically identifies file formats by reading Magic Bytes (file header signatures). Here is a detailed usage guide:
Upload Files: You can upload files in two ways. First, drag and drop files directly into the large dashed-border area in the center of the page—multiple files are supported for batch analysis. Second, click the dashed area to open the file picker dialog and select one or more files. The tool immediately reads the first 64 bytes of each file for analysis.
View Detection Results: After uploading, the tool displays a detailed result card below, including the detected file type, recommended file extension, MIME type, and file size. For unknown file types, the tool displays the hex file header to help you manually determine the format.
Reading the Hex View: The hex view consists of three columns: the left side shows the hexadecimal offset (byte position from the start of the file), the middle shows the corresponding byte values in hexadecimal format, and the right side shows the ASCII character representation (non-printable characters displayed as dots). This view helps you understand the internal structure of the file.
Supported File Types: The tool supports over 50 common file formats, including images (PNG/JPEG/GIF/BMP/WebP/TIFF/ICO), documents (PDF/DOCX/XLSX/PPTX/ZIP/RAR/7Z), audio (MP3/WAV/FLAC/OGG/AAC), video (MP4/AVI/MKV/MOV), executables (ELF/EXE/Mach-O), and web files (HTML/CSS/JS/JSON/XML/SVG).
The File Type Detector is practical in many scenarios. Here are some typical use cases:
Data Recovery & Forensics: When a file extension has been maliciously changed (e.g., renaming .exe to .jpg) or lost entirely, the file header signature can accurately determine the true type, avoiding security risks. In digital forensics, header analysis is a critical technique for identifying file types.
Batch File Organization: When you have collected many files from various sources without proper extensions or with inconsistent extensions, this tool can quickly identify the true type of each file and help you organize them. This is especially useful when dealing with files exported from legacy systems.
Development & Debugging: Web developers working on file upload features need to ensure that the backend receives files of the expected type. By analyzing file headers, you can verify that your upload component correctly identifies file types and troubleshoot Content-Type related issues.
Education & Learning: Computer science students and enthusiasts can use this tool to visually understand the internal structure of different file formats and learn how Magic Bytes work. The hex view helps grasp how binary files are organized.
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. The term comes from the early Unix file command, which used "magic numbers" to identify file types. For example, PNG images always start with 89 50 4E 47, and JPEG images always start with FF D8 FF. These signatures are standardized internationally and defined by various file format specifications.
File Extension vs. File Header: A file extension (like .jpg, .png) is just part of the filename and can be easily changed, making it unreliable. File header signatures are inherent properties of the file content that cannot be altered by renaming. Modern operating systems and security software typically check both the extension and the header to confirm file types.
MIME Types: MIME (Multipurpose Internet Mail Extensions) types are standard identifiers for file formats on the internet, maintained by IANA. Examples include image/jpeg, application/pdf, etc. Each MIME type corresponds to a set of file extensions and file signatures. The File Type Detector maps detected signatures to their corresponding MIME types for easy use in web applications.
| File Type | Extension | Magic Bytes (Hex) |
|---|---|---|
| PNG Image | .png | 89 50 4E 47 |
| JPEG Image | .jpg/.jpeg | FF D8 FF |
| GIF Image | .gif | 47 49 46 38 |
| BMP Image | .bmp | 42 4D |
| WebP Image | .webp | 52 49 46 46 |
| PDF Document | 25 50 44 46 | |
| ZIP Archive | .zip | 50 4B 03 04 |
| RAR Archive | .rar | 52 61 72 21 |
| 7-Zip Archive | .7z | 37 7A BC AF |
| GZIP Archive | .gz | 1F 8B |
| MP3 Audio | .mp3 | FF FB or FF F3 |
| WAV Audio | .wav | 52 49 46 46 |
| FLAC Audio | .flac | 66 4C 61 43 |
| MP4 Video | .mp4 | 00 00 00 xx 66 74 79 70 |
| MKV Video | .mkv | 1A 45 DF A3 |
| ELF Executable | (none) | 7F 45 4C 46 |
| Windows Executable | .exe | 4D 5A |
| Mach-O Executable | (none) | CF FA ED FE |
| Photoshop Document | .psd | 38 42 50 53 |
The file type detector reads the first few bytes of a file (called Magic Bytes or file signatures) to determine its format. Each file format has a specific byte signature—for example, PNG files start with 89 50 4E 47, and JPEG files start with FF D8 FF. The tool matches these signatures against a known database to identify the file format.
It can identify the original format of encrypted or corrupted files if the file header remains intact, but cannot read the content. Encrypted files typically have intact headers, so their type can still be detected. If the header is damaged, accurate detection is not possible.
Over 50 common file types are supported, including images (PNG/JPEG/GIF/BMP/WebP/TIFF/ICO), documents (PDF/DOCX/XLSX/ZIP/RAR/7Z), audio (MP3/WAV/FLAC/OGG/AAC), video (MP4/AVI/MKV/MOV), executables (ELF/EXE/Mach-O), and web files (HTML/CSS/JS/JSON/XML/SVG).
No. This tool runs entirely in your browser using JavaScript's FileReader API. Data never leaves your device. You can safely analyze files containing sensitive information.
If the detection result is inaccurate, the file header may have been modified or the format may be new or rare. Please check the hex view and compare it with the reference table. If you confirm it's a new format, feel free to contact us via email and we'll update the detection library.
The tool only reads the first 64 bytes of a file for identification, so theoretically it supports files of any size. However, very large files (such as multi-gigabyte videos) may take longer to process in the browser—please be patient with extremely large files.
Yes. You can drag and drop or select multiple files at once. The tool will analyze each file individually and display results in sequence. Each file analysis is independent.
Microsoft Office documents (DOCX, XLSX, PPTX) and modern e-books (EPUB) are actually ZIP archives internally, with content stored as XML files within the ZIP container. Therefore they share the same Magic Bytes as ZIP files. The tool will prioritize identifying them as Office documents when possible, otherwise defaulting to ZIP.