File Extension Identifier

Next

Type a filename or an extension and the tool reports the extension, the file type name and the MIME type. It is the quick way to find out what a .dat, .bin or .m4a might be, and it makes double extensions such as invoice.pdf.exe visible before you open anything.

How to identify a file type

  1. 1

    Type the filename or extension

    Enter a full filename like `report.dat`, a bare extension like `.png`, or a URL that ends in a filename.

  2. 2

    Read the report

    The tool shows the extension, the file type name and the MIME type. Unknown extensions are reported honestly.

  3. 3

    Watch for double extensions

    If a file is named `invoice.pdf.exe`, the report shows `exe`. That is a common trick to hide an executable, so treat such files with care.

  4. 4

    Use the reference table

    The table below lists the first bytes (magic numbers) of common formats, so you can verify a file in a hex viewer.

Magic bytes for common formats

Format First bytes (hex) ASCII
PNG 89 50 4E 47 .PNG
JPEG FF D8 FF ...
GIF 47 49 46 38 GIF8
PDF 25 50 44 46 %PDF
ZIP 50 4B 03 04 PK..
7z 37 7A BC AF 7z..
RAR 52 61 72 21 Rar!
MP3 49 44 33 / FF FB ID3 / …
ELF 7F 45 4C 46 .ELF
EXE 4D 5A MZ

The extension alone does not prove the contents. If the extension says .png but the file starts with 4D 5A, you are looking at a Windows executable someone renamed, do not open it. A hex viewer can confirm the first bytes of any file.

Extensions attackers love

Extension Why it is abused
.scr Screensaver files run arbitrary code on Windows
.iso Disk images auto-mount on modern Windows
.lnk Shortcuts can run PowerShell one-liners
.html Lets attackers embed a credential harvester
.zip inside .pdf Double-extension evasion

When the tool helps

  • Someone emails you resume.pdf.exe; the report shows the real exe extension.
  • You download song.mp3 and want to know what MIME type it should have; if in doubt, compare the first bytes with the table above.
  • You inherit a directory of files with odd extensions and need to identify them one by one.
  • A legacy system outputs .dat; the tool tells you it is not a standard format, so open it in a hex viewer to check.

Common mistakes

  • Trusting the extension alone. Windows hides known extensions by default, so invoice.pdf.exe appears as invoice.pdf in Explorer.
  • Treating .txt as safe. A .txt file can still carry a macro-enabled Office document if renamed, or a script if the user mis-opens it.
  • Assuming binary = dangerous, text = safe. A malicious .js or .ps1 script is pure text.

Frequently Asked Questions

No. The tool only looks at the filename or extension you type. It does not read the file contents, and it cannot detect a file renamed to another extension.

Every format has a signature in its first few bytes (for PNG, 89 50 4E 47). Open the file in a hex viewer and compare the first bytes with the table above; the extension alone is not proof.

Yes, trivially. .jpg files can be renamed to .exe and the other way around. The tool reports the real (last) extension, so a double extension like photo.jpg.exe is easy to notice.

Text files are intended to be human-readable and safe to open in any editor. Binary files contain non-printable bytes (images, executables, archives) and should be opened only with their intended application.

Related Tools

Tool available in other languages