inspect

MIME Detect

Identify a file by its magic bytes — independent of file extension or the browser-reported type. Useful for verifying uploads and spotting mislabeled files.

Loading…

About MIME Detect

MIME Detect identifies what a file actually is by reading its magic bytes, independent of the file extension or whatever type the browser reported. It is the tool to grab when an upload claims to be one thing but behaves like another, or when a file has the wrong (or missing) extension. Detection happens in your browser, so the file is never uploaded to find out what it is.

Category
inspect
Input
Accepts: */*.
Output
Outputs: application/json.
Cost
Free, runs in your browser
Memory
low
Privacy: MIME Detect runs entirely on your device. Files you provide never leave your browser — no uploads, no server, no tracking. The page works offline once loaded.

Common uses

  • Confirm a file labeled .jpg is really a JPEG and not a renamed executable
  • Identify a file that arrived with no extension at all
  • Verify that a user upload matches its claimed content type before processing it
  • Spot a mislabeled archive that is actually a PDF or image
  • Double-check the true type of a download before opening it
  • Diagnose why an app rejected a file by comparing reported type to actual signature

Frequently asked questions

How does it know the file type without the extension?

It reads the file's magic bytes, the signature bytes at the start of the file that identify its real format, so the extension and browser-reported type do not matter.

Can it detect any file type?

It recognizes formats that have a known magic-byte signature. Plain text and some formats without distinctive headers can be ambiguous and may not resolve to a specific type.

Does my file get uploaded to a server?

No. The signature is read locally in your browser; the file stays on your device.

What does the output look like?

A JSON result describing the detected type, so you can compare it against the extension or the type the browser claimed.

Why does the detected type differ from the extension?

Extensions can be renamed or wrong. A mismatch means the file's actual bytes do not match its label, which is exactly what this tool surfaces.

Keywords

  • mime
  • detect
  • magic
  • signature
  • file-type
  • sniff
  • identify
  • verify

Try next