How to show file extensions, view file extensions on Windows

Windows File Explorer offers a lot of options to change how you view files. What you might not know is that one important option is disabled by default, even though it's crucial to the security of your system.

File extensions are important

File extensions are three- or four-letter suffixes that appear after the final period of a file name, such as .txt, .exe, or .pdf. These extensions act as identifiers so that the operating system (and you) can instantly recognize what type of file they are.

Windows uses file extensions to determine which application to launch when you double-click a file. For example, an .exe file will launch an application, while a .docx file will open a Word file in Microsoft Word . Many programs save files with a specific file extension, which can then only be opened in that program (or a compatible third-party tool).

How to show file extensions, view file extensions on Windows
Executable file in Windows

One important advantage of being able to see file extensions is the ability to detect potentially dangerous files. Certain extensions such as .exe, .bat, .cmd, .vbs, and .scr (among others) can be malicious files designed to run malicious code on your system. These files often use file extensions used by legitimate Windows tools and programs, so detecting them can be quite difficult.

Despite their importance, file extensions are hidden by default in all modern versions of Windows. This is done to create a cleaner user interface in File Explorer. However, malware creators often use hidden extensions to disguise malicious executables as harmless-looking documents to trick users into running malware on their PCs, so it’s best to leave them visible.

Show file extensions on Windows

Luckily, showing file extensions on Windows only takes a few clicks. On Windows 11, just open File Explorer with the Windows key + E shortcut , click View in the top bar, hover over Show , and select File name extensions . You’ll see the file extensions for all the files saved on your computer.

How to show file extensions, view file extensions on Windows
File name extensions option in File Explorer

If you don't see the top bar in File Explorer, you can also show file extensions from Windows settings. Follow these steps:

  1. Press Windows key + I to open Windows Settings . Go to the System tab and select For developers .
  2. Expand the File Explorer section by clicking on it, then make sure the Show file extensions slider  is turned on.
How to show file extensions, view file extensions on Windows
How to show file extensions, view file extensions on Windows

Especially if you're using an older version of Windows, Control Panel is also useful for displaying file extensions:

  1. Open the Start menu and search for Control Panel . Click the corresponding option.
  2. Change Category to Small icons if needed, then select File Explorer options .
  3. In the View tab , make sure that the Hide extensions for known file types option  is unchecked.
How to show file extensions, view file extensions on Windows
How to show file extensions, view file extensions on Windows

You can also show file extensions by making a small change to the Windows Registry, but you should avoid doing this. The three methods above will work on any version of Windows you’re using in 2025 and are much less error-prone. However, if you want to quickly show file extensions, just run this command in Windows Terminal or PowerShell :

reg add HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced /v HideFileExt /t REG_DWORD /d 0 /f

This command will add the necessary entries to the Windows Registry to tell File Explorer to start displaying file extensions. Remember to refresh File Explorer with the F5 key to see the changes.

How attackers exploit hidden file extensions

As mentioned, hackers often exploit hidden file extensions on Windows to disguise malicious files as harmless files. For example, a file named image.png.exe will appear as a PNG image file in File Explorer with a hidden file extension, when in fact it is an executable file that can run malicious code or malware when launched.

This technique is called a “double extension attack,” and it’s the most common type of file extension attack you’ll see. Fortunately, as long as the file extension is enabled, these malicious EXE files  are fairly easy to spot and avoid. However, this isn’t the only technique that tries to use hidden extensions to trick you. Some other common methods include:

Technique

For example

Describe

Right-to-Left Override (RTLO)

image[RTLO]gpj.exe appears as image.exe.jpg

The attacker used the Unicode character U+202E to reverse the file name.

Whitespace Padding

document.pdf[insert 100 spaces].exe

You can put more whitespace between the fake and real file extensions, so the real file extension will be pushed off the screen even if the file extension is displayed.

Icon Manipulation

The document.exe file with a PDF icon

This is a simple technique where criminals will change the malicious file's icon to a more familiar icon, such as a PDF or JPG icon.

PIF file

document.pif

The PIF file extension is automatically hidden by Windows, even if file extensions are enabled. However, PIF files are rarely used in modern versions of Windows.

As you can see, there are a number of tricks an attacker can use to trick you into running a malicious executable file that you might think is an image. However, by spending just a few seconds displaying file extensions on Windows, you can fall for this trick before you accidentally launch any malware on your PC.

File extensions help identify the type of file you're dealing with, but Microsoft's default practice of hiding them in File Explorer leaves an opening for malicious files to disguise as malicious. Don't fall for these tricks! Show file extensions and always double-check a file before opening it, especially if it's from the Internet or you didn't ask for it.

Leave a Comment

Fix Flatpak Apps Not Respecting GTK Themes in Ubuntu 24.04

Fix Flatpak Apps Not Respecting GTK Themes in Ubuntu 24.04

Learn why Flatpak apps may ignore Ubuntu 24.04 GTK themes and follow safe steps to check theme extensions, refresh Flatpak apps, and diagnose portal issues.

How to Dual-Boot Ubuntu 24.04 and Windows 11 With BitLocker Enabled

How to Dual-Boot Ubuntu 24.04 and Windows 11 With BitLocker Enabled

Install Ubuntu 24.04 alongside Windows 11 with BitLocker safely. Compare separate-drive and shared-drive paths, recovery keys, partitioning, and boot checks.

How to Fix Nvidia Drivers Not Loading After a Kernel Update on Ubuntu

How to Fix Nvidia Drivers Not Loading After a Kernel Update on Ubuntu

Diagnose NVIDIA driver failures after an Ubuntu kernel update. Check DKMS and Secure Boot, rebuild the matching module, enroll a MOK, and verify the fix.

How to Fix Ubuntu 24.04 Wi-Fi Disconnecting After Suspend

How to Fix Ubuntu 24.04 Wi-Fi Disconnecting After Suspend

Fix Ubuntu 24.04 Wi-Fi drops after suspend with checks for NetworkManager, radio blocks, updates, power saving, and drivers—then verify each resume.

Fix High CPU Usage by Tracker-Miner-3 in Ubuntu GNOME

Fix High CPU Usage by Tracker-Miner-3 in Ubuntu GNOME

Learn why tracker-miner-fs-3 uses high CPU in Ubuntu GNOME and how to check indexing, exclude folders, update Ubuntu, or safely rebuild the search index.

Fix “No Bootable Device Found” After Installing Debian on UEFI

Fix “No Bootable Device Found” After Installing Debian on UEFI

Fix Debian’s UEFI boot error by checking boot mode, the EFI System Partition, GRUB files, and firmware boot order—without reinstalling Debian first.

Outlook Inbox Repair Tool

Outlook Inbox Repair Tool

The Outlook Inbox Repair Tool fixes corrupted PST files quickly so you can recover emails and restore normal Outlook function. Follow these exact steps to run scanpst.exe without data loss.

Adobe PDF Installer Offline

Adobe PDF Installer Offline

Get the Adobe PDF Installer Offline to install Acrobat Reader on any PC without needing internet during setup. Follow these exact steps for the full standalone package.

How to Chromecast from Laptop to TV

How to Chromecast from Laptop to TV

Learn how to Chromecast from laptop to TV with this step-by-step guide. Stream browser tabs, videos, or your full screen from Windows or Mac to your TV in minutes.

How to Edit an Adobe PDF File

How to Edit an Adobe PDF File

Learn how to edit an Adobe PDF file in Adobe Acrobat with precise steps for text, images, and layout changes. Make professional edits quickly and save time.