File extensions are hidden by default on most computers, but turning them on takes one setting change

A file extension is the short code at the end of a filename that tells your computer what kind of file it is. For example, a Word document ends in .docx, a photo ends in .jpg, and a video ends in .mp4. By default, Windows and Mac hide these extensions from view, showing you only the filename itself. Turning them back on helps you spot suspicious files, understand what program will open something, and avoid accidentally changing a file's type.

The steps differ between Windows and Mac, and the exact menu locations depend on which version you have. Below are the most common paths for recent versions of each system.

Key Takeaways

  • File extensions are the three or four letters after the dot at the end of a filename, and they tell your computer what type of file it is.
  • On Windows 11, go to View in File Explorer, then check the box next to "File name extensions" to see them permanently.
  • On Mac, open Finder, go to Preferences, click Advanced, and check "Show all filename extensions" to display them for all files.
  • Seeing extensions helps you spot dangerous files disguised as documents or images, since a real photo will end in .jpg or .png, not .exe or .scr.
  • Once you turn extensions on, they stay visible until you turn them off again — the setting applies to all folders on your computer.

How to show file extensions on Windows 11

Open File Explorer by pressing the Windows key and E together, or by clicking the folder icon on your taskbar. At the top of the window, click the View tab. A menu will appear with several options. Look for the checkbox next to "File name extensions" and click it to turn it on.

Once you check that box, every file on your computer will now display its extension. The setting stays on until you uncheck it again. If you are using Windows 10 instead, the steps are nearly identical: open File Explorer, click View at the top, and look for "File name extensions" in the Show or Hide section.

How to show file extensions on Mac

Open Finder by clicking the Finder icon in your dock, or by pressing Command and Space together and typing "Finder." Once Finder is open, click Finder in the menu bar at the very top of your screen, then select Preferences from the dropdown.

A window will open with several tabs. Click the Advanced tab. Near the bottom of that window, you will see a checkbox next to "Show all filename extensions." Click it to turn it on. Close the Preferences window, and all files in Finder will now show their extensions.

Why seeing extensions matters for security

Hiding extensions makes it easier for someone to trick you into opening a dangerous file. For example, a file named "Resume.pdf.exe" will appear as just "Resume.pdf" when extensions are hidden — it looks like a safe document, but it is actually an executable program that could harm your computer. With extensions visible, you see the .exe at the end and know not to open it.

Phishing emails and malicious downloads often rely on this trick. A scammer might send you a file that looks like an invoice or a photo, but the hidden extension reveals it is actually a script or program. Turning extensions on is one of the simplest ways to catch these disguises.

Common file extensions and what they mean

Knowing a few common extensions helps you understand what will happen when you open a file. Documents use .doc, .docx (Word), .pdf (PDF), and .txt (plain text). Images use .jpg, .png, .gif, and .bmp. Videos use .mp4, .mov, .avi, and .mkv. Audio files use .mp3, .wav, and .flac.

Executable files — programs that run code on your computer — use .exe (Windows), .app (Mac), .msi (Windows installer), and .scr (screensaver). These last ones are the ones to be cautious about. If you receive an email attachment that ends in .exe, .scr, .bat, .com, or .vbs, do not open it unless you are absolutely certain it came from someone you trust and you were expecting it.

What to do if you see an unfamiliar extension

If you see a file with an extension you do not recognize, do not open it. Instead, search the extension online — type a question mark followed by the extension into a search engine, like "what is .xyz file" — and read what comes up. Many extensions are harmless and belong to specific programs, but some are less common and worth understanding before you interact with them.

If someone sent you the file and you are not sure why, ask them directly what it is before opening it. A legitimate sender will be happy to explain. If you are suspicious, it is always safer to delete the file and ask the person to resend it in a more common format, like a PDF or a Word document.

Turning extensions back off if you prefer

If you find that seeing extensions clutters your view or confuses you, you can turn them off again using the same steps. On Windows, go back to View in File Explorer and uncheck "File name extensions." On Mac, go back to Finder Preferences, click Advanced, and uncheck "Show all filename extensions." The setting will revert immediately.

Most people who work with files regularly prefer to keep extensions on, because the extra information helps prevent mistakes. But the choice is yours, and you can change it whenever you want.

Frequently Asked Questions

Can I see extensions for just one file instead of all files?

On Windows, right-click a file, select Properties, and look at the full filename in the General tab — the extension will be shown there even if it is hidden in File Explorer. On Mac, click a file once to select it, then press Command and I together to open the Info window, where you can see the full filename with extension.

What if I accidentally change a file's extension?

If you renamed a file and changed its extension by mistake, you can undo it by pressing Ctrl and Z on Windows or Command and Z on Mac immediately after. If you did not undo it right away, rename the file again and restore the correct extension. The file itself is not harmed — changing the extension just tells your computer what program to use when you open it.

Do I need to show extensions on external drives and USB sticks?

The setting applies to all drives connected to your computer, including external ones. If you turn extensions on, you will see them on USB drives and external hard drives too. You can turn them off again if you prefer, and the change will apply everywhere.

Why does my Mac show some extensions but not others?

Some Mac applications hide their extensions even when you have turned the setting on. This is usually intentional — the developer wants you to see the filename without the extension. If you need to see the extension for a specific file, select it and press Command and I to open the Info window.