Magic Bytes Detection
Most binary formats begin with a fixed byte pattern. The checker reads this header and identifies formats such as PNG, JPEG, GIF, PDF, ZIP, RAR, 7-Zip, MP3, MP4, WebP, SQLite and executables.
Find the real type of any file from its signature (magic bytes) and see if the extension matches. Fast, free and no signup.
Drag it in or browse your device. Any file type works.
The tool reads the first bytes and matches them to known signatures.
See the real type and whether it matches the file extension.
Looking for a free file signature checker that tells you what a file really is? Select any file and this online tool reads its first bytes, matches them against known file signatures (also called magic numbers or magic bytes), and shows the real file type, the MIME type and a hex dump of the header. It then compares the result with the file extension, so you can quickly spot renamed, mislabeled or suspicious files. Everything runs inside your browser. There is no signup, no watermark, and your file is never uploaded to a server.
Most binary formats begin with a fixed byte pattern. The checker reads this header and identifies formats such as PNG, JPEG, GIF, PDF, ZIP, RAR, 7-Zip, MP3, MP4, WebP, SQLite and executables.
If a file is named photo.jpg but its header says it is an executable, you see a clear warning instead of trusting the name.
Only the first 4 KB of the file is read, and only inside your browser. The file never leaves your device.
Along with the format name, you get the matching MIME type, for example image/png or application/pdf, which is handy for web servers, APIs and upload forms.
See the first 64 bytes as a hex dump with offsets and an ASCII column, the same view a hex editor shows, without installing anything.
Check as many files as you like. No account, no file size upload limit to worry about, and no software to download.
A file signature is a short, fixed pattern of bytes at the start of a file that identifies its format. It is also called a magic number, magic bytes or a file header. Programs use it to decide how to open a file, even when the name or extension is missing or wrong. A PNG image, for example, always begins with the eight bytes 89 50 4E 47 0D 0A 1A 0A, and a PDF document begins with the text "%PDF-".
The file extension, such as .jpg or .pdf, is only part of the file name. It is a label that the operating system uses to pick a default program, and anyone can change it in a few seconds by renaming the file. The signature, on the other hand, is part of the file content itself. That is why checking the signature is a much more reliable way to find out what a file really is.
When you select a file, the tool uses your browser to read only the first 4,096 bytes. It never reads or sends the full file. The header bytes are then compared with a built-in list of known signatures in several steps:
The table below lists well-known file signatures in hexadecimal. Use it as a quick magic numbers reference when you analyze a file in a hex editor or write your own file type detection code.
| File type | Signature (hex) | Offset | Typical extension |
|---|---|---|---|
| PNG image | 89 50 4E 47 0D 0A 1A 0A | 0 | .png |
| JPEG image | FF D8 FF | 0 | .jpg, .jpeg |
| GIF image | 47 49 46 38 37 61 / 39 61 | 0 | .gif |
| BMP image | 42 4D | 0 | .bmp |
| TIFF image | 49 49 2A 00 / 4D 4D 00 2A | 0 | .tif, .tiff |
| WebP image | 52 49 46 46 ... 57 45 42 50 | 0 and 8 | .webp |
| PDF document | 25 50 44 46 2D | 0 | |
| RTF document | 7B 5C 72 74 66 | 0 | .rtf |
| Office 97-2003 (OLE) | D0 CF 11 E0 A1 B1 1A E1 | 0 | .doc, .xls, .ppt |
| ZIP archive | 50 4B 03 04 | 0 | .zip, .docx, .xlsx, .pptx |
| RAR archive | 52 61 72 21 1A 07 | 0 | .rar |
| 7-Zip archive | 37 7A BC AF 27 1C | 0 | .7z |
| GZIP archive | 1F 8B 08 | 0 | .gz |
| TAR archive | 75 73 74 61 72 ("ustar") | 257 | .tar |
| MP3 audio | 49 44 33 or FF FB | 0 | .mp3 |
| FLAC audio | 66 4C 61 43 | 0 | .flac |
| OGG media | 4F 67 67 53 | 0 | .ogg, .opus |
| MP4 video | 66 74 79 70 ("ftyp") | 4 | .mp4, .m4a, .mov |
| Matroska / WebM | 1A 45 DF A3 | 0 | .mkv, .webm |
| SQLite database | 53 51 4C 69 74 65 20 66 6F 72 6D 61 74 20 33 00 | 0 | .sqlite, .db |
| WOFF font | 77 4F 46 46 | 0 | .woff |
| WOFF2 font | 77 4F 46 32 | 0 | .woff2 |
| Java class file | CA FE BA BE | 0 | .class |
| Windows executable (PE) | 4D 5A ("MZ") | 0 | .exe, .dll, .sys |
| ELF executable | 7F 45 4C 46 | 0 | .elf, .so |
| Mach-O executable | CF FA ED FE / FE ED FA CF | 0 | .dylib, .bundle |
| Script with shebang | 23 21 ("#!") | 0 | .sh, .py, .pl |
After the scan, the result panel shows a colored banner and a few key rows. Here is what each outcome means:
| Banner | What it means | What to do |
|---|---|---|
| Green: signature matches | The header agrees with the extension in the file name. | The format is as labeled. This is not a malware scan. |
| Orange: extension does not match | The header belongs to a different format than the name suggests. | Rename the file to the correct extension, or check where it came from. |
| Red: executable with another extension | The header says program file, but the name looks like an image, document or archive. | Do not open it unless you fully trust the source. Scan it with a security tool. |
| Grey: no signature or text file | The file is plain text, empty, or uses a format this tool does not recognize. | Check it in a text editor or with the program that created it. |
The "First 8 bytes" row and the hex header let you confirm the result yourself, and the MIME type row gives you the value that web servers and APIs normally use for that format.
A mismatch does not always mean something bad. These are the most common reasons:
If a file will not open in the program you expect, a quick signature check is often the fastest way to learn the real format, so you can open it with the right application or rename it correctly.
File type spoofing means making a file look like a harmless type. Common tricks include a double extension such as invoice.pdf.exe, a very long file name that hides the real ending, and a program file renamed to .jpg or .docx. Because many systems hide known extensions by default, the user may only see "invoice.pdf" and trust it.
A few simple habits lower the risk:
Many popular formats are really ZIP archives with a specific folder structure inside. Microsoft Word (.docx), Excel (.xlsx) and PowerPoint (.pptx) files, OpenDocument files (.odt, .ods, .odp), e-books (.epub), Java archives (.jar) and Android apps (.apk) all start with the same ZIP signature, 50 4B 03 04. The letters "PK" at the start come from Phil Katz, the creator of the ZIP format.
To keep results useful, this tool also scans the beginning of the archive for known entry names such as "word/", "xl/", "ppt/" or "AndroidManifest.xml". When it finds them, it reports the more specific type and treats the matching extension as correct. If it cannot tell, it reports a ZIP archive and accepts any ZIP-based extension.
Plain text formats such as TXT, CSV, TSV, JSON, HTML, XML, CSS, JavaScript and source code files have no fixed header. They are only readable text, so no magic number can identify them. For these files the checker looks at the content: if it contains no unusual control bytes, it is treated as text, and for some formats it can make a best guess, for example content that starts with an SVG or HTML tag, an XML declaration or an opening curly brace that suggests JSON.
Because the guess is based on the first few lines only, the result for text files is shown as informational and not as a confirmed match. If a text file has an extension that normally belongs to a binary format, for example a "photo.png" that only contains text, you will see a warning.
If you build a website or an app that accepts uploads, never trust the file name or the Content-Type sent by the browser. Both are chosen by the client and are easy to fake. A safer approach combines several checks:
You can use this checker during development to see exactly which bytes a test file starts with and to confirm that your validation rejects a renamed file.
A matching signature does not prove a file is safe or complete. A file can start with a valid header and still contain harmful content later on, and some attacks deliberately build files that are valid in two formats at once. Signatures also cannot confirm that the whole file is intact, since only the beginning is read. Text formats have no signature at all, and rare or proprietary formats may not be in the built-in list.
Use this tool as a quick first check to learn the real file type, then use an up-to-date security scanner when you need to know whether a file is malicious.
Our free file signature checker helps you identify the true type of a file in seconds. It works on desktop and mobile, needs no signup, adds no watermark and does not upload your file. Whether you want to check a magic number, verify a file extension, find the MIME type of a file or inspect a file header in hex, you can do it here in one step and then check as many other files as you need.
Find answers to common questions about file signatures, magic bytes and checking the real type of a file.
A file signature, or magic number, is a fixed sequence of bytes at the beginning of a file that identifies its format. For example, PDF files start with the bytes for "%PDF-" and PNG files start with 89 50 4E 47.
The checker reads the first bytes of your file and compares them with a list of known signatures. If it finds a match, it shows the detected type and compares it with the extension in the file name.
The file may have been renamed, saved with the wrong extension, or damaged. Because an extension can be changed freely, the signature is a more reliable hint to the real format. Be careful with files whose real type is an executable but whose name suggests an image or document.
No. Only the first few kilobytes of the file are read inside your browser, and nothing is sent to our server or stored.
No. It identifies the file format from its header, which is not the same as scanning for malware. A file with a matching signature can still be harmful, so use an up-to-date antivirus or security scanner for that.
Modern Office files, along with formats such as ODT, EPUB, JAR and APK, are ZIP containers with specific contents inside. They share the ZIP signature, so the checker also looks inside the header when it can and treats these extensions as compatible with a ZIP-based file.
Plain text formats such as TXT, CSV, JSON, HTML and code files have no fixed header, so they cannot be identified by a signature. The checker can only tell that the content looks like text and make a best guess for some formats.
Merge, split, compress and convert files in seconds. Explore powerful free tools for all your everyday needs.
Explore All Tools →