# Magic Number Detector

Identify file types by their magic numbers (file signatures)

> Canonical page: https://elysiatools.com/en/tools/magic-number-detector

- **Category:** Utilities

- **Keywords:** magic number, file signature, hex, binary, file type, detector, header, file identification

## Overview

The Magic Number Detector is a precise utility designed to identify file types by analyzing their unique file signatures, commonly known as magic numbers. By inputting the hexadecimal header sequence, you can instantly verify the true format of a file regardless of its extension.

## Inputs

- **Hex Signature** (text): e.g., 50 4B 03 04 or 504B0304

## When to use

- Verify the authenticity of a file when the extension is missing or suspicious.
- Troubleshoot corrupted files that fail to open in standard software.
- Identify unknown binary data extracted from raw disk images or network streams.

## How it works

- Enter the hexadecimal signature string found at the beginning of your file.
- Submit the sequence to the detector to compare it against known file format standards.
- Receive the identified file type or format associated with that specific byte sequence.

## Use cases

- Forensic analysis to confirm file types during security investigations.
- Data recovery to identify raw fragments of files without metadata.
- Software development to validate file uploads by checking headers before processing.

## Frequently asked questions

### What is a magic number?

A magic number is a constant numerical or text value used to identify the file format or protocol of a file, typically located in the first few bytes of the file header.

### Do I need to include spaces in the hex signature?

No, the tool accepts both space-separated hex strings (e.g., 50 4B 03 04) and continuous strings (e.g., 504B0304).

### Can this tool identify any file type?

It can identify any file type that has a standardized, well-documented magic number signature.

### Is my file data uploaded to a server?

The tool processes the signature string locally; no actual files are uploaded or stored.

### Why does my file have a different extension than the result?

If the result differs from your extension, it indicates the file has been renamed or mislabeled, which is a common tactic in obfuscation or a sign of a corrupted header.

## Related tools

- [File Type Detector (Magic Number)](https://elysiatools.com/en/tools/file-type-detect): Identify a file by its magic-number byte signature, not the extension. Reads the uploaded file directly across ~70 types.
- [API Breaking Changes Detector & Migration Planner](https://elysiatools.com/en/tools/api-breaking-changes-detector-migration-planner): Compare two OpenAPI 3.x schemas, identify breaking changes, grade client impact, and suggest migration or compatibility strategies
- [Credit Card Validator](https://elysiatools.com/en/tools/credit-card-validator): Validate credit card numbers and identify card type (Visa, MasterCard, UnionPay, etc.)
- [EIN Validator](https://elysiatools.com/en/tools/ein-validator): Validate US Employer Identification Numbers
- [Linear Programming Simplex Solver (Two-Phase)](https://elysiatools.com/en/tools/linear-programming-simplex): Two-phase simplex for 2–6 variables and 1–8 ≤/≥/= constraints: Bland's rule, per-iteration pivot log, optimal/unbounded/infeasible status, and substitution checks.
- [Tracking Number Validator](https://elysiatools.com/en/tools/tracking-number-validator): Identify and validate tracking numbers from FedEx, UPS, DHL, USPS, SF Express (顺丰) and other major carriers
- [Image Adaptive Threshold](https://elysiatools.com/en/tools/image-adaptive-threshold): Apply adaptive threshold operation that calculates threshold for small regions, suitable for varying lighting conditions
- [Image Custom Convolution Kernel](https://elysiatools.com/en/tools/image-custom-kernel): Apply custom convolution kernel by defining your own matrix values for personalized image effects and processing

## Samples

- [EU VAT Number Samples](https://elysiatools.com/en/samples/eu-vat): Collection of EU VAT numbers from all member states for validation testing
- [Global Phone Number Samples](https://elysiatools.com/en/samples/global-phone): Collection of phone numbers from various countries for validation testing
- [Number & Currency Samples](https://elysiatools.com/en/samples/number-currency-samples): Text containing various number and currency formats for testing currency extraction
- [Passport Number Samples](https://elysiatools.com/en/samples/passport): Collection of valid passport number samples from various countries (China, USA, Japan, UK, Germany, etc.) for testing

## Related content

- [Binary Encoding, File Forensics, and Integrity Tools](https://elysiatools.com/en/hubs/binary-encoding-file-forensics-integrity): Inspect bytes and signatures, identify file types, measure entropy, and verify hashes or checksums in one safe forensic workflow.
