MIME Type Checker

How to use

Detects a file's real type by reading its first bytes (its "magic number"), then compares that against what the browser reports, catching files with misleading extensions. Upload any file to check it.

Web ToolsLocal only

Click to choose a file

When to use this
  • Verifying a downloaded file is actually what its extension claims before opening it
  • Investigating a suspicious email attachment with a mismatched icon or extension
  • Confirming an uploaded file's real format before processing it in an app or pipeline
  • Checking whether a file was renamed accidentally and now has the wrong extension

Declared type, actual bytes, and why browsers stopped guessing

A MIME type is a claim a server makes in the Content-Type header about what it is sending. Nothing enforces that the claim matches the bytes. A file with a .png extension can contain a ZIP archive, and a server will cheerfully label it image/png because it looked at the name. Checking the actual signature (the magic bytes at the start of the file, 89 50 4E 47 for PNG, 25 50 44 46 for PDF, 50 4B 03 04 for ZIP and every format built on it) is what tells you what you really have.

Browsers used to resolve mismatches by sniffing the content and acting on what they found. That behaviour became a security problem: a file uploaded as a harmless image and sniffed as HTML would execute as HTML, which is a direct path to cross-site scripting on any site accepting uploads. The X-Content-Type-Options: nosniff header exists to switch sniffing off, and modern browsers increasingly refuse to guess at all. The practical consequence is that a wrong Content-Type no longer degrades gracefully: it fails, and the failure is usually a blank page or a download prompt where content was expected.

This is also why extension-based validation is not validation. Anything accepting uploads should check the signature rather than the filename, and should serve user-supplied files from a separate origin with an explicit, restrictive Content-Type. Note that signature checking identifies a container, not its contents: .docx, .xlsx, .jar and .apk all begin with the ZIP signature, because all of them are ZIP archives with particular structures inside.

Free and private. Everything runs on your own device, with no account and no uploads.

File extensions can lie, a renamed .exe with a .jpg extension will still open as an executable. This tool detects a file's real type by reading its actual first bytes, not just its name.

They are a distinctive sequence of bytes at the start of a file that reliably identifies its true format, regardless of the file's extension.

This usually happens when a file has been deliberately or accidentally renamed with a misleading extension.

Because it is one. Those formats are ZIP archives of XML files, so their first bytes are the ZIP signature. Magic bytes identify the container; the extension and the files inside tell you which Office or e-book format it is, so a ZIP result for a .docx is expected rather than a warning.

How it works
  1. 1

    Upload a file

    Select any file you want to verify.

  2. 2

    Compare detected vs reported type

    See the real file type based on its magic bytes alongside what the browser reports.

  3. 3

    Spot mismatches

    A mismatch between the two flags a potentially misleading file extension.

Pro tips
  • ·A mismatch between reported and detected type is a strong warning sign, don't open the file until you know why.
  • ·Some legitimate files (like certain container formats) can show unexpected magic bytes; check the specific format's spec if unsure.
  • ·Combine this with a checksum check when verifying a file from an untrusted source, since magic bytes confirm format but not integrity.