AZ Tools

File Type Detector (Magic Bytes)

File

Reads the first 512 bytes of any dropped file in the browser and matches them against a table of ~35 well-known file signatures (PNG, JPEG, GIF, WebP, PDF, ZIP, GZIP, 7z, MP3, FLAC, MP4, MKV, WOFF2, ELF, PE, SQLite, …). Compares the detected type against the browser-reported MIME (which comes from the OS, usually from the extension) and flags mismatches — useful when checking downloaded archives, verifying that a renamed .jpg really is a JPEG, or sanity-checking user-uploaded files before processing.

How to use

  1. Drop or pick any file.
  2. Read the detected type — if it disagrees with the declared one, the badge will tell you.

Frequently asked questions

Does the file leave my browser?
No. Only the first 512 bytes are read, and only locally through the File API. Nothing is uploaded.
Why does a .docx come up as ZIP?
DOCX, XLSX, PPTX, JAR, EPUB, and OOXML are all ZIP containers under the hood. To distinguish them you'd need to inspect a specific entry inside the archive — magic-byte detection alone can't tell them apart.

Related tools