How to determine file type for files without extension

Today we will review three methods to determine file type without extension. After installing the operating system, most advanced users turn on file extensions in File Explorer. Because with help of extensions, you can easily determine the type of file. Extensions allow finding a suitable program to open the file.

But not all files, even those that can be found on the Internet, have the extension. For example, you may encounter several files without an extension when recovering deleted files. Such files can also be part of some firmware,  Base64 blobs, and so on.

If some file doesn’t have an extension, the Windows will not be able to open such a file. It will not know which program to use to open it. However, such file retains its the logical structure and the contents. You can verify this yourself by deleting the extension of a file, and then trying to open it with the appropriate program. You won’t have any problems with opening it.

Therefore, it is not only the extension that determines the file type. The type of a file determines its format, or otherwise the data structure specification. The extension and format are very often confused, although  they are completely different concepts.But how to determine the file format if its extension has been lost for some reason? This issue has a few solutions.

Determine file type without extension

  1. Download the file-windows tool from this link:
  2. Extract the ZIP file you’ve downloaded to any folder. You may also need to install VC++ runtime.
  3. Open a command prompt to that folder and execute: file.exe <full path to your file without extension>. In PowerShell, run this command as ./file.exe <full path to your file without extension>.Determine file type without extension with the FILE tool
  4. See the output for the file type.

The file command does not actually show the file extension. Instead it shows its type. In the screenshot above, you can see that the file file1 is a registry file, the file2 file is a PNG image, and file3 is a zip archive.

Using the file tool in WSL

If you have WSL installed, you can use it instead of downloading ‘file-windows’. The file tool is included in most Linux distributions; the default Ubuntu image on WSL has it. So you can open WSL to the folder containing your files without extension, and run file <file name> right in WSL.

The file tool in WSL

Yet another method is the freeware TrID tool.

The TrID app

Unlike the file tool, the TrID is more convenient way to determine the file type. That’s because it has a file header database that allows it to work more accurate. You can download the utility for Windows and its signature database from the developer’s website

Trid download

Determine the type of the file with TrID

Download both files and extract them to the same folder.

Now, open a new command prompt to that folder and run trid <full path to your file without extension>. As a result, the app will show several variants with a percentage of the probability of matching a particular extension.

Determine the type of the file with TrID

It also allows you to analyze all the files in the directory. For that, run it as trid <path/ to the folder/*>. It will show possible matches for all files.

There are also other utilities similar to TrID, such as Detect It Easy with a user-friendly graphical interface.

The Detect It Easy tool

You can download its latest version from the project page on GitHub.

Detect It Easy already includes an up-to-date binary signature database. The app is available for Windows, Linux, and MacOS.

Click on the button with three dots to open a file without extension.

Detect It Easy tool

The app will show the file type it has detected. You can also select a different method for the file scan, and open it in the HEX view.

Looks like you've read the post to the end. If you enjoyed it, please share it. You would greatly help our blog to grow!

Author: The MFTNEXT Team

The MSFTNEXT project is a small team of authors who love to engage with the latest technology and gadgets. Being passionate Windows bloggers, we are happy to help others fix their system issues.

Leave a Reply

Your email address will not be published.