Windows 11 hides file extensions by default, but you can turn them back on in three clicks

File extensions are the letters after the dot in a filename — like .pdf, .docx, or .jpg. Windows 11 hides them by default to make filenames look cleaner, but this can make it harder to spot when a file is not what it claims to be. A file named "Resume.pdf.exe" looks like "Resume.pdf" when extensions are hidden, which is a common trick used in phishing attacks and malware. Turning extensions back on takes less than a minute and gives you better visibility into what you are actually opening.

Key Takeaways

  • File extensions show you the true type of a file — hiding them can make malware or phishing files look legitimate.
  • You can turn on file extensions in File Explorer by opening View settings and checking "File name extensions".
  • Once turned on, extensions stay visible for all files and folders on your computer.
  • Showing extensions is especially useful when downloading files from email or the internet, where disguised files are more common.

How to turn on file extensions in File Explorer

Open File Explorer by pressing Windows key + E, or by clicking the folder icon on your taskbar. At the top of the window, you will see a menu bar with "File", "Home", "Share", and "View". Click on "View".

In the View menu, look for a checkbox labeled "File name extensions". Click it to turn it on. The checkbox will now have a checkmark, and all files in File Explorer will when ready show their extensions. This setting applies to every folder and file on your computer from that moment forward.

Why this matters for security

When extensions are hidden, a file can lie about what it is. An attacker can name a malicious program "Invoice.pdf.exe" — but you will only see "Invoice.pdf" in File Explorer. When you double-click it, Windows runs the .exe file instead of opening a PDF, and the malware installs itself.

With extensions visible, you would see "Invoice.pdf.exe" and when ready know something is wrong. A real invoice would end in .pdf, not .exe. This is especially important for files you read from email, messaging apps, or unfamiliar websites, where this kind of disguise is common.

What you will see after turning extensions on

Once extensions are visible, every file will show its true type. Documents will show .docx, .xlsx, or .txt. Images will show .jpg, .png, or .gif. Programs will show .exe or .msi. Shortcuts will show .lnk. This extra information takes up a little more space in the filename, but it tells you exactly what the file is.

You may also notice files you did not know had extensions — like "Thumbs.db" (a hidden image cache) or ".gitignore" (a configuration file). These are normal system files. If you see an extension you do not recognize on a file someone sent you, you can search for it online to find out what it is before opening it.

File extensions you should be cautious about

Some extensions are more dangerous than others because they can run code on your computer. Executable files (.exe, .msi, .bat, .cmd, .com, .scr) should only come from sources you trust. Script files (.vbs, .js, .ps1) can also run code. If you receive any of these from an unexpected source — especially in email or a read link — do not open it.

Office files (.docx, .xlsx, .pptx) can contain macros, which are small programs embedded inside the document. Windows will warn you if a macro is present, but the safest approach is to disable macros unless you know the file came from someone you trust.

Other ways to check what a file really is

Showing extensions is the fastest check, but you can also right-click a file and select "Properties" to see more details. The "Type of file" field will tell you what Windows thinks the file is. If the extension does not match the type, something is wrong.

You can also hover your mouse over a file to see a preview tooltip with more information. On some files, Windows will show a description like "process" or "Microsoft Word Document". If a file claims to be a PDF but Windows calls it an "process", that is a red flag.

Frequently Asked Questions

Will turning on file extensions break anything?

No. Showing extensions does not change how files work or how programs open them. It only changes what you see in File Explorer. Your computer will run exactly the same way.

Can I hide extensions again if I change my mind?

Yes. Go back to View in File Explorer and uncheck "File name extensions". The extensions will disappear again when ready. You can toggle this on and off whenever you want.

What if I see a file with two extensions, like "document.pdf.exe"?

That is almost always a sign of malware or a phishing attempt. Do not open it. Delete it or move it to the Recycle Bin. A legitimate file should have only one extension.

Do I need to show extensions on every folder?

No. When you turn on "File name extensions" in View settings, it applies to all folders and files on your computer at once. You do not need to do it separately for each folder.

Are there any files where I should not see an extension?

System files that start with a dot (like ".gitignore" or ".env") are normal and intentional. Folders never have extensions — only files do. If you see a folder with an extension, that is unusual and worth investigating.