By default, File Explorer in Windows 10 does not show the file extension for most file types. This is a security risk as anyone could send you a malicious file named "Runme.txt.exe" but Windows will hide the .exe portion, so an inexperienced user can inadvertently open the file thinking that it is a text file and malware will infect his or her PC.
Here is the default appearance of File Explorer in Windows 10:
In this article, we will look how to change this behavior so file extensions are always shown, and, as a bonus, we will also look at how we can force File Explorer to always show or always hide file extensions for a specific file type.
How to show or hide file extensions in Windows 10
In Windows 10, there are some options which allow you to show or hide file extensions in File Explorer. Let's explore them all.
The first option is in the modern Ribbon interface. It has a checkbox on the View tab to toggle File name extensions.
Tick the File Name Extensions checkbox and you will get them showing instantly:
The second method is a special option in Folder Options. You can access Folder Options from the View tab of the File Explorer Ribbon.
The Folder options dialog will appear on the screen:
Here, switch to the View tab and untick the Hide extensions for known file types checkbox. The result will be the same - extensions will be turned on.
You may notice that some files, like DLL files, have extensions displayed in File Explorer even if you have turned extensions off. In the screenshot below, you can see that File name extensions checkbox is unchecked, however, extensions are visible for *.dll files.
In Windows 10, it is possible to force File Explorer to hide or show file extensions for a specific file type. This can be done using Registry Editor. For example, let's make the file extension for EXE files always visible.
- Open the Registry editor.
- Navigate to the following key:
Tip: You can access any desired Registry key with one click.
- Look at the right side and see the Default value. It's value data is exefile.
This value called the ProgID and it points us to the required subkey of HKCR key, i.e.
Open this subkey and create an empty string value here named AlwaysShowExt:
- Now sign out from your Windows 10 session and sign in back or just restart the Explorer shell.You will get the following changes:
From the image above, you can see that extensions are always visible now for *.exe files even if they are turned off for other file types.
Let's try now doing the opposite and force File Explorer to always hide the extension of *.exe files even when file extensions are enabled.
In the same registry key, HKEY_CLASSES_ROOT\exefile, delete the AlwaysShowExt value and create a new empty string value named NeverShowExt.
Using these simple tweaks, you can control file extensions for any file type you wish to show or hide. This trick works in all modern Windows versions including XP, Vista, Windows 7 and Windows 8.
Winaero greatly relies on your support. You can help the site keep bringing you interesting and useful content and software by using these options: