Detect File Types by Magic Bytes Online Detect file format by analyzing magic bytes (file signature) in the header.
File Format Identifier
Detect file format by analyzing magic bytes (file signature) in the header.
Upload any file
Drop or select any file to identify.
View detection result
See the detected format, MIME type, and confidence level.
Inspect hex dump
View the first bytes of the file in hex format.
What Is File Format Identifier?
File Format Identifier detects file types by analyzing magic bytes โ the specific byte sequences at the beginning of files that identify their format. Unlike relying on file extensions (which can be changed or wrong), magic byte analysis examines the actual file content. The tool checks against 30+ known file signatures covering images (JPEG, PNG, GIF, WebP), documents (PDF, Office, RTF), archives (ZIP, GZIP, RAR, 7Z), audio (MP3, FLAC, OGG), video (MP4, WebM), fonts (WOFF, TTF, OTF), and more. It also displays a hex dump of the first 64 bytes for manual inspection.
Why Use File Format Identifier?
-
Identifies files by actual content, not just file extension.
-
30+ file signatures covering all common formats.
-
Hex dump display for manual inspection.
-
Shows detected extension, MIME type, and confidence level.
Common Use Cases
Unknown Files
Identify files with missing, incorrect, or unfamiliar extensions.
Security Analysis
Verify that file extensions match actual content to detect disguised files.
Data Recovery
Identify recovered files that have lost their extensions or metadata.
Development
Verify file type detection logic and examine file headers during development.
Technical Guide
The tool reads the first 512 bytes of the uploaded file as an ArrayBuffer and checks them against a database of known magic byte sequences. Each signature specifies: the byte values to match, optional byte offset, the file extension, MIME type, and human-readable description.
Signatures are checked in order, with longer/more specific signatures checked first. The match process compares each byte of the signature against the file bytes at the specified offset, optionally applying a bit mask.
The hex dump displays the first 64 bytes in traditional hex dump format: offset, hexadecimal byte values, and ASCII character representation. Non-printable characters are shown as dots.
Confidence levels: "High" means the signature match is strong and specific. Some formats share similar headers (e.g., ZIP-based formats like DOCX, XLSX, JAR), resulting in notes about possible alternatives.
Tips & Best Practices
-
1Magic byte detection is more reliable than file extensions, which can be easily changed.
-
2Some formats share signatures (e.g., .docx/.xlsx/.jar are all ZIP-based).
-
3The hex dump helps you identify custom or unusual file formats manually.
-
4Only the first 512 bytes are read โ the file is not fully loaded into memory.
Related Tools
File Size Analyzer
Analyze file size with unit conversions and transfer time estimates.
๐ File Conversion
Encoding Detector
Detect text file character encoding (UTF-8, UTF-16, ASCII, Latin-1).
๐ File Conversion
BOM Detector/Remover
Detect and remove Byte Order Marks (BOM) from text files.
๐ File Conversion
File Metadata Viewer
View comprehensive file metadata including size, type, entropy, and hex header.
๐ File ConversionFrequently Asked Questions
Q How many formats are detected?
Q Is the entire file read?
Q What if the format is not detected?
Q Can it detect ZIP-based formats (DOCX, XLSX)?
Q Is my file uploaded?
About This Tool
File Format Identifier is a free online tool by FreeToolkit.ai. All processing happens directly in your browser โ your data never leaves your device. No registration or installation required.