AnyTool
Your files never leave your device. All processing happens locally in your browser.

How do I find the real type of a file regardless of its extension?

Drop a file onto AnyTool and it reads the magic-byte signature to identify the true format, its MIME type, and the correct extension — and warns if the extension does not match. Only the file header is read, all in your browser, with no upload.

  • True format from magic bytes, not the file extension
  • MIME type, canonical extension, and mismatch warnings
  • Hex header viewer with the matched signature highlighted
  • Handles 400+ binary formats plus text heuristics
  • 100% in-browser — instant on drop, no upload

What is

Magic Bytes

Magic bytes (a file signature) are the first few bytes of a file that identify its true format — for example PNG starts with 89 50 4E 47 and PDF with 25 50 44 46. Reading them reveals the real type even when the file extension is wrong or spoofed.

Developer Tools

Related terms

File SignatureMIME TypeFile FormatHex ViewerMagic Number

Frequently Asked Questions

No — only the file header is read locally; nothing is uploaded.

The detector reads just the first slice of the file in your browser to match the signature, so the file never leaves your device, there is no size-cap surprise, and it works offline after first load.

Yes — it flags when the real format does not match the file extension.

If a file named .jpg is actually a PDF or executable, the tool shows the true detected format and a mismatch warning, which is the main reason to check magic bytes instead of trusting the extension.

Hundreds of binary formats plus common text formats.

It detects 400+ binary formats (images, audio, video, archives, documents, executables) via magic-byte signatures, and adds heuristics for text formats like JSON, XML, SVG, CSV, and HTML that signature libraries skip.

Detailed Explanation

Methodology

How the File Type Detector Works

AnyTool reads only the first header slice of a dropped file in the browser and matches its magic-byte signature to the true format, MIME type, and canonical extension, then warns when the real type differs from the file extension. It detects 400+ binary formats via the file-type engine and adds in-house heuristics for text formats it skips (JSON, XML, SVG, CSV, HTML), disambiguates ZIP-based containers (docx/xlsx/jar/apk/epub) by inspecting entry names, and shows a hex viewer with the matched signature highlighted.

  • True format from magic bytes, not extension
  • MIME type, canonical extension, mismatch warning
  • 400+ binary formats plus text heuristics
  • Container disambiguation (docx/jar/apk/epub)
  • Hex header viewer with matched bytes highlighted
Privacy & Security

Privacy and Offline Use

Only a small header slice is read locally (never the whole file uploaded), with the detector chunk self-hosted and no runtime CDN, so files never leave the device, there is no size-cap surprise, and the tool works offline as an installable PWA.

File Type Detector: AnyTool vs typical tools
CapabilityAnyToolTypical tools
Format coverage400+ plus textOften ~100–200
Extension mismatch warningYesSometimes
Hex header viewerYesRare
Batch + offlineYesRare
Processing locationIn-browser (header only)Often upload

Capabilities reflect the live AnyTool tool; competitor behavior varies by service.