Advertisement

How to Show or Hide File Extensions in Windows 10

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.

Advertisеment

Here is the default appearance of File Explorer in Windows 10:

File Explorer Default View

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.

File Explorer Ribbon View Tab

Tick the File Name Extensions checkbox  and you will get them showing instantly:

File Explorer Show File Extensions

The second method is a special option in Folder Options. You can access Folder Options from the View tab of the File Explorer Ribbon.

File Explorer Options Button

The Folder options dialog will appear on the screen:File Explorer Folder Options Dialog

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.

File Explorer Show File Extensions Method 2

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.

File Explorer Some Extensions Always Visible

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.

  1. Open the Registry editor.
  2. Navigate to the following key:
    HKEY_CLASSES_ROOT\.exe

    Tip: You can access any desired Registry key with one click.

  3. Look at the right side and see the Default value. It's value data is exefile.Registry Exe File Extension PathThis value called the ProgID and it points us to the required subkey of HKCR key, i.e.
    HKEY_CLASSES_ROOT\exefile

    Open this subkey and create an empty string value here named AlwaysShowExt:Registry Exe File AlwaysShowExt

     

  4. Now sign out from your Windows 10 session and sign in back or just restart the Explorer shell.You will get the following changes:File Explorer Exe AlwaysShowExt 1

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.Registry Exe File NeverShowExtAgain, restart the Explorer shell. The file extension for *.exe files will be always hidden even if you turn on file extensions for other file types:File Explorer Exe Extension Is Hidden

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.

Support us

Winaero greatly relies on your support. You can help the site keep bringing you interesting and useful content and software by using these options:

If you like this article, please share it using the buttons below. It won't take a lot from you, but it will help us grow. Thanks for your support!

Advertisеment

Author: Sergey Tkachenko

Sergey Tkachenko is a software developer who started Winaero back in 2011. On this blog, Sergey is writing about everything connected to Microsoft, Windows and popular software. Follow him on Telegram, Twitter, and YouTube.

5 thoughts on “How to Show or Hide File Extensions in Windows 10”

  1. Sergey, on your last screenshot shows “hidden files” .exe which are “never seen” ) How then is it that they are still visible?

  2. Which hidden files? The screenshot is not related to hidden files.
    It is about file extensions only. Read carefully.

  3. Please note that you cannot sort on file extensions when displayed as part of the file name. You can create a new Header by clicking on the header bar, selecting “more” and scrolling down to “file extension.” Select it by checking the box and save. Then go to Options/View/Apply to folders and set it for all similar folders. Now you can click on the column title and sort by extension.

  4. Hi Sergey, How can I force Windows to NOT show file extensions for Jpg files? I’ve tried most things, but nothing seems to work.

    Thanks in Advance.

Leave a Reply

Your email address will not be published.

css.php
Using Telegram? Subscribe to the blog channel!
Hello. Add your message here.