Magic Numbers and File Signatures
The tool compares a limited set of known byte patterns near the start of the file. A match suggests a format but is not proof; container formats such as ZIP may hold many document types.
Preparing your comprehensive developer toolkit
Practical Guide
Identifies common formats from file signatures, including images, archives, audio, video, and executable containers. This page recognizes a focused set of signatures, not hundreds of types.
File signatures are byte patterns that can suggest a format. This tool checks a limited set of signatures in the first 512 bytes and compares the result with the extension; it does not verify a file is safe or intact.
The tool compares a limited set of known byte patterns near the start of the file. A match suggests a format but is not proof; container formats such as ZIP may hold many document types.
It reads file.slice(0, 512).arrayBuffer() locally, compares known signatures, and falls back to the extension when none matches. It does not scan the whole file or infer a MIME type.
The detected signature and extension mismatch can flag a file for further inspection. Signature checks alone cannot establish safety, recover files, or validate uploads.
Compare the first 512 bytes with a focused set of known signatures.
Recognize common image, archive, audio, video, and executable formats.
View the first 16 bytes in hex and ASCII and copy the hex values.
See filename, size, extension, detection source, and signature-extension mismatches.
Compare a downloaded file’s signature with its extension before choosing an app.
Check a sample header while testing import or upload handling.
Copy the first bytes as hex when reporting an unknown file.
No. All detection runs locally in your browser. Files are not uploaded.
Extensions can be renamed. The detector trusts magic numbers (content) more than extensions.
No. The tool reports the first known signature it matches and cannot reliably identify every polyglot or embedded format. Inspect the header with a dedicated tool when certainty matters.
A unique byte sequence at the file start that indicates its format, e.g., JPEG FF D8 FF, PNG 89 50 4E 47.
No. This browser result is only a clue. Production upload checks need server-side validation and, where appropriate, content scanning and format-specific parsing.
Examples of file signatures and their limitations.
Read only the first bytes of a selected file.
Convert the selected file header to binary data.
Browser specification for File and Blob operations.
Open the tool to try these features.