Shiklo Tools
PDF40
Image20
Calculators & Converters25
Text & Writing13
Developer26
Video14
Audio14
Document14
Data & Spreadsheet12
Web & SEO9
OCR & Scanning5
Archive & File12
Security & Privacy23
Health & Medical29
QR & Barcode5

File Type Detector

Find out what a file really is from its content (magic bytes), not its name, and see if the extension is wrong.

A file's name can say anything: renaming photo.png to report.pdf does not turn it into a PDF. Programs instead recognise formats by their content, usually a short signature at the very start called the magic bytes. This tool reads those bytes and tells you what the file really is, its MIME type and its usual extensions, and whether the name fits. It catches files with a wrong or missing extension, downloads saved with the wrong type, and suspicious files such as a Windows program disguised as an image.

Choose or drop up to 50 files of any type. Only the first 64 KB of each file are read, in your browser; nothing is uploaded, so you can safely check private documents or files you do not trust. The tool recognises 116 formats, from images, documents and archives to audio, video, programs, fonts and data files.

How to use File Type Detector

  1. Choose or drop one or more files (any type, up to 50).
  2. Read the detected type, MIME type and usual extensions for each file.
  3. Check the badge: Matches, Extension does not match, No extension or Unknown.
  4. Rename a file to its correct extension if needed.

Features

  • Identifies 116 formats by their content
  • Flags wrong and missing extensions
  • MIME type, usual extensions and text encoding
  • First bytes shown in hex and as text
  • Several files at once
  • Reads only the first 64 KB; nothing is uploaded

Magic bytes of common formats

Most formats start with a fixed signature. These are some of the ones the tool checks; the bytes are shown in hexadecimal, as in a hex editor.

FormatFirst bytes (hex)As text
PDF document25 50 44 46 2D%PDF-
PNG image89 50 4E 47 0D 0A 1A 0A.PNG....
JPEG imageFF D8 FF...
GIF image47 49 46 38 39 61GIF89a
ZIP archive50 4B 03 04PK..
RAR archive52 61 72 21 1A 07Rar!..
7-Zip archive37 7A BC AF 27 1C7z..'.
gzip compressed file1F 8B..
Windows program4D 5AMZ
Linux / Unix program (ELF)7F 45 4C 46.ELF
SQLite database53 51 4C 69 74 65 20 66 6F 72 6D 61 74 20 33 00SQLite format 3.
WebAssembly module00 61 73 6D.asm

Formats inside other formats

Some formats share a container, so the first bytes are not enough. Word, Excel and PowerPoint files (.docx, .xlsx, .pptx), OpenDocument files, EPUB e-books, Java archives and Android apps are all ZIP archives; the tool looks inside the start of the archive for the parts that tell them apart. MP4, MOV, M4A, HEIC, AVIF and 3GP files all use the ISO media format and are told apart by their brand code. WAV, AVI and WebP share the RIFF container, and WebM is a kind of Matroska file. Old Word, Excel and PowerPoint files (.doc, .xls, .ppt) and Outlook messages use the same Compound File container and are reported together.

Text files

Plain text has no signature, so the tool looks at the content: HTML, XML, SVG, JSON, CSV and tab-separated tables, subtitles, contacts and calendar files, PEM certificates and scripts that start with #! are recognised, and the text encoding is reported (ASCII, UTF-8, UTF-16 or Windows-1252). For CSV and very large JSON files the result is marked likely rather than certain. Any text extension is accepted for text content, because a .log or .txt file may legitimately hold CSV or JSON.

Why a wrong extension matters

Programs choose how to open a file from its extension, so a wrong one leads to errors like this file is damaged, even though the file is fine and only needs renaming. A mismatch can also be a warning sign: attackers name programs invoice.pdf.exe or give scripts an image extension to trick people into opening them. If this tool says a file that should be a document or picture is a Windows program or a script, do not open it. Bear in mind that a signature only shows the format, not whether the file is safe or complete: a real PDF can still contain malicious content, and a truncated file still starts with valid magic bytes.

Frequently asked questions

How do I find out what type a file is?

Drop it on this page. The tool reads the first bytes, which identify the format, and shows the type, MIME type and usual extension.

Is my file uploaded?

No. Only the first 64 KB are read, in your browser. Nothing leaves your device.

What are magic bytes?

A short, fixed signature at the start of a file that identifies its format, for example %PDF- for PDF documents and PK for ZIP archives.

How many formats does it recognise?

116, grouped as images, documents, archives, audio, video, programs, fonts, data and text. The full list is on the page.

Why does my .docx show as a Word document but my .doc as an old Office file?

.doc, .xls and .ppt use the same old container, which cannot be told apart from the first bytes, so they are reported together.

What if the result is Unknown?

The content matches none of the known signatures. It may be encrypted, raw data, or a rare or proprietary format.

Can it tell if a file is safe?

No. It identifies the format only. Use it to spot disguised programs, but scan suspicious files with antivirus software.

Related tools