Skip to content
⚠ TESTING ENVIRONMENT You are viewing a testing copy of Tolioo. Changes here do not affect the live website.

File Signature Checker

Find the real type of any file from its signature (magic bytes) and see if the extension matches. Fast, free and no signup.

  • 100% free
  • No Signup
  • File never uploaded
FILE
file.ext
0 KB
ADVERTISEMENT
Demo Ad 728 x 90

How to check a file signature

1Select a file

Drag it in or browse your device. Any file type works.

2Read the header

The tool reads the first bytes and matches them to known signatures.

3Compare

See the real type and whether it matches the file extension.

FILE SECURITY GUIDE

File Signature Checker: Find the Real File Type Online (Magic Number and File Header Analyzer)

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.

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.

Extension Mismatch Alerts

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.

Private by Design

Only the first 4 KB of the file is read, and only inside your browser. The file never leaves your device.

MIME Type Lookup

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.

Hex Header Viewer

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.

Free and Unlimited

Check as many files as you like. No account, no file size upload limit to worry about, and no software to download.

What Is a File Signature (Magic Number)?

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.

How This File Type Checker Works

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:

  1. Container formats first. Some formats share an outer wrapper. RIFF files are split into WebP, WAV and AVI by reading the four-letter code at byte 8. MP4, MOV, HEIC and AVIF files are recognized by the word "ftyp" at byte 4 followed by a brand code.
  2. ZIP and ZIP-based files. If the header starts with the bytes 50 4B 03 04, the tool also looks at the file names stored near the start of the archive to tell DOCX, XLSX, PPTX, EPUB, JAR and APK files apart from a plain ZIP.
  3. Signatures at other offsets. Not every signature sits at byte 0. A TAR archive, for example, stores the word "ustar" at offset 257, so the checker looks there too.
  4. The signature list. The remaining bytes are matched against dozens of well-known signatures for images, documents, archives, audio, video, fonts, databases and executables.
  5. Text detection. If no binary signature matches but the content looks like readable text, the tool makes a best guess such as HTML, XML, SVG, PHP or JSON.
  6. Comparison. Finally, the detected type is compared with the extension in the file name and the result is shown as a match, a mismatch or a warning.

How to Check the Real File Type of a File

  1. Drag and drop your file onto the upload box, or click "Select file" and choose it from your device.
  2. The tool instantly reads the header and shows the detected type, the MIME type, the extension found in the name and the extension that is expected for that type.
  3. Check the colored banner. Green means the signature matches the extension, orange means a mismatch, red means an executable hiding behind another extension, and grey means no signature could be confirmed.
  4. Open the hex header to see the first 64 bytes if you want to verify the result yourself.
  5. Use "Change file" or "Remove" to check another file. Nothing is stored, so you can repeat this as often as needed.

Common File Signatures List (Hex Values)

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 typeSignature (hex)OffsetTypical extension
PNG image89 50 4E 47 0D 0A 1A 0A0.png
JPEG imageFF D8 FF0.jpg, .jpeg
GIF image47 49 46 38 37 61 / 39 610.gif
BMP image42 4D0.bmp
TIFF image49 49 2A 00 / 4D 4D 00 2A0.tif, .tiff
WebP image52 49 46 46 ... 57 45 42 500 and 8.webp
PDF document25 50 44 46 2D0.pdf
RTF document7B 5C 72 74 660.rtf
Office 97-2003 (OLE)D0 CF 11 E0 A1 B1 1A E10.doc, .xls, .ppt
ZIP archive50 4B 03 040.zip, .docx, .xlsx, .pptx
RAR archive52 61 72 21 1A 070.rar
7-Zip archive37 7A BC AF 27 1C0.7z
GZIP archive1F 8B 080.gz
TAR archive75 73 74 61 72 ("ustar")257.tar
MP3 audio49 44 33 or FF FB0.mp3
FLAC audio66 4C 61 430.flac
OGG media4F 67 67 530.ogg, .opus
MP4 video66 74 79 70 ("ftyp")4.mp4, .m4a, .mov
Matroska / WebM1A 45 DF A30.mkv, .webm
SQLite database53 51 4C 69 74 65 20 66 6F 72 6D 61 74 20 33 000.sqlite, .db
WOFF font77 4F 46 460.woff
WOFF2 font77 4F 46 320.woff2
Java class fileCA FE BA BE0.class
Windows executable (PE)4D 5A ("MZ")0.exe, .dll, .sys
ELF executable7F 45 4C 460.elf, .so
Mach-O executableCF FA ED FE / FE ED FA CF0.dylib, .bundle
Script with shebang23 21 ("#!")0.sh, .py, .pl

Understanding Your File Signature Result

After the scan, the result panel shows a colored banner and a few key rows. Here is what each outcome means:

BannerWhat it meansWhat to do
Green: signature matchesThe header agrees with the extension in the file name.The format is as labeled. This is not a malware scan.
Orange: extension does not matchThe 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 extensionThe 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 fileThe 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.

Why Does the File Extension Not Match the Real File Type?

A mismatch does not always mean something bad. These are the most common reasons:

  • Manual renaming. Someone changed .png to .jpg thinking it would convert the image. Renaming does not convert a file, it only changes the label.
  • Wrong "Save as" setting. A program saved the content in one format but added a different extension.
  • Downloads with no extension. Some websites and apps send files with generic names such as "download" or "file", so the type has to be found from the content.
  • Converted by a faulty tool. A buggy converter may only rename the file instead of re-encoding it.
  • Damaged or incomplete files. A corrupted header or a half-finished download may no longer match its format.
  • Intentional disguise. Malware authors sometimes name a program file like a document or picture so that people open it by mistake.

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, Fake Extensions and Safe Opening Habits

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:

  • Turn on "show file extensions" in your operating system so the full file name is visible.
  • Treat unexpected attachments with caution, even from known senders, and check the real type before opening.
  • Be extra careful with files whose real type is an executable, script or shortcut but whose name looks like an image or document.
  • Scan downloads with an up-to-date antivirus or security scanner, and keep your operating system and applications updated.
  • When in doubt, do not open the file. Ask the sender through another channel or open it in a sandbox or virtual machine.
Remember: a file signature checker tells you the format of a file. It does not tell you whether the contents are safe.

Why Are DOCX, XLSX, PPTX, JAR and APK Files Detected as ZIP?

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.

Files That Have No File Signature

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.

File Upload Validation: Tips for Developers

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:

  • Check the content on the server. Detect the type from the file bytes. In PHP, the Fileinfo extension (finfo) reads the header to return a MIME type, and Laravel's "mimes" and "mimetypes" validation rules are based on the file content.
  • Use an allow-list. Accept only the formats you need, for example PNG, JPEG and WebP for avatars, instead of trying to block dangerous ones.
  • Set a size limit and reject empty files.
  • Rename uploads to random names and store them outside the public web root, so a user-supplied name can never be executed.
  • Re-encode images with an image library. This removes hidden data appended after the real image.
  • Disable script execution in the upload directory in your web server configuration.
  • Scan with antivirus when files are shared with other users.

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.

Common Uses of a File Signature Checker

  • Identify a file with no extension or with a generic name such as "download", "attachment" or "file".
  • Verify downloads and email attachments before opening them.
  • Recover data. After a disk or phone recovery, files often come back with random names. The header shows what each one is.
  • Digital forensics and IT support. Quickly confirm whether a file matches its claimed type.
  • Fix files that will not open. Find the real format and rename the file correctly.
  • Test upload filters and validation rules during web development.
  • Learn how formats work. The hex view is a simple way to see how PNG, PDF, ZIP and other formats start.

What a File Signature Check Cannot Tell You

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.

Free Online File Type Detector With No Upload

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.

ADVERTISEMENT
Demo Ad In-article
COMMON QUESTIONS

Frequently Asked Questions About File Signatures

Find answers to common questions about file signatures, magic bytes and checking the real type of a file.

What is a file signature?

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.

How does a file signature checker work?

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.

Why does the detected type differ from my file extension?

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.

Is my file uploaded to your server?

No. Only the first few kilobytes of the file are read inside your browser, and nothing is sent to our server or stored.

Can this tool tell me if a file is a virus?

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.

Why is my DOCX, XLSX or PPTX file detected as ZIP?

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.

Why does my text file have no signature?

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.

ADVERTISEMENT
Demo Ad 970 x 250

All Tools, One Place

Merge, split, compress and convert files in seconds. Explore powerful free tools for all your everyday needs.

Explore All Tools →