File Format Doctor
Find out what a file really is from its bytes, why it will not open and how to convert it.
Try an example: iPhone photo renamed to .jpg (HEIC inside) · Invoice that is really a Windows program · Word document (ZIP local header with word/ entry)
How it works
Upload a file (or paste its first bytes as hex) and the doctor reads its magic number against a table of 74 formats, looks inside ZIP containers (DOCX, XLSX, ODT, EPUB, JAR, APK), and diagnoses wrong extensions, truncated or encrypted files, text encoding problems and disguised executables — with offline conversion commands.
- Magic numbers are matched at their documented offsets for 74 formats (e.g. "%PDF-" at 0, "ustar" at 257, "CD001" at 0x8001, "ftyp" brands at 4).
- ISO-BMFF files are told apart by their ftyp brands (heic/heix → HEIC, mif1 → HEIF, avif → AVIF, qt → QuickTime, M4A → audio, isom/mp42 → MP4).
- ZIP files are opened by reading the central directory (or local file headers in a sample): [Content_Types].xml + word/ → DOCX, xl/ → XLSX, ppt/ → PPTX, the stored "mimetype" entry → ODT/ODS/ODP/EPUB, AndroidManifest.xml → APK, META-INF/MANIFEST.MF → JAR. General-purpose bit 0 marks encrypted entries.
- Without a binary signature the bytes are checked for BOMs, UTF-16 patterns, strict UTF-8 validity and typical mojibake sequences (e.g. "é", "’"), then for SVG/HTML/XML/JSON/CSV structure.
- Truncation checks (uploads only): PDF must end with %%EOF, PNG with IEND, JPEG with FF D9, GIF with 3B, ZIP must have an end-of-central-directory record, RIFF/BMP declared sizes must fit.
- Conversion suggestions use free, offline tools (LibreOffice, ImageMagick, FFmpeg, 7-Zip, iconv) with the exact command for your file name.
Detection reads bytes only; it does not scan for malware. Never run an executable you did not expect to receive.
Sources
- List of file signatures (Wikipedia) retrieved 2026-10-12
- APPNOTE.TXT – .ZIP File Format Specification (PKWARE) retrieved 2026-10-12
- Registered brands (MP4 Registration Authority) retrieved 2026-10-12
For scripts and AI agents
- JSON API:
POST https://fileformatdoctor.usefulweb.site/api/v1/calculate(same calculation as this page) - Interface description: OpenAPI 3.1 · AI guide: llms.txt
- MCP server (Streamable HTTP):
https://fileformatdoctor.usefulweb.site/mcp· tool namefile_format_doctor
Example request
curl -s -X POST https://fileformatdoctor.usefulweb.site/api/v1/calculate \
-H 'content-type: application/json' \
-d '{"filename":"IMG_0420.jpg","hexBytes":"00 00 00 18 66 74 79 70 68 65 69 63 00 00 00 00 6d 69 66 31 68 65 69 63"}'Related tools
- FileFit – Can this app open, edit or convert that file format? Verified facts with sources.