Why you need to see file extensions
A file extension is the two to four letters after the dot at the end of a filename — like .pdf, .docx, or .jpg. By default, Windows and Mac hide these extensions, which makes it harder to spot when a file is not what it claims to be. A document that looks like "Resume.pdf" might actually be "Resume.pdf.exe" (a program that could harm your computer), but you would not know because the .exe is hidden.
Showing extensions also helps you understand what program will open a file before you click it, and makes it easier to organize files by type. Once you turn this on, you will see the full filename for every file on your computer.
Key Takeaways
- File extensions are hidden by default on both Windows and Mac, which can hide dangerous files disguised as documents.
- On Windows 11, open File Explorer, click the View tab at the top, and check the box next to "File name extensions".
- On Mac, open Finder, click Finder in the menu bar, select Preferences, go to the Advanced tab, and check "Show all filename extensions".
- Once you turn this on, every file will show its full name including the extension, making it easier to spot suspicious files.
How to show extensions on Windows 11
Open File Explorer by pressing the Windows key and E together, or by clicking the folder icon on your taskbar. You should see your files and folders listed in the main window.
Look at the top of the File Explorer window. You will see a menu bar with tabs like "File", "Home", "Share", and "View". Click on the "View" tab. A dropdown menu will appear with several options. Find the checkbox labeled "File name extensions" and click it. The checkbox will fill in, and from that moment on, every file on your computer will show its full name with the extension at the end.
This setting stays on until you turn it off again. It applies to all folders and drives you access through File Explorer.
How to show extensions on Mac
Open Finder by clicking the Finder icon in your dock (it looks like a blue and white face) or by pressing Command and Space together, then typing "Finder" and pressing Enter.
Once Finder is open, click "Finder" in the menu bar at the very top of your screen. A dropdown menu will appear. Click "Preferences" near the top of that menu. A window will open with several tabs across the top. Click the "Advanced" tab. You will see a checkbox that says "Show all filename extensions". Click that checkbox to turn it on.
Close the Preferences window. From now on, all files in Finder will display their extensions. Like Windows, this setting stays on until you change it back.
What extensions tell you about a file
Once extensions are visible, you can use them to spot files that might be dangerous. Documents should end in .pdf, .docx, .xlsx, or .txt. Images should end in .jpg, .png, or .gif. Videos should end in .mp4, .mov, or .avi. Programs and installers end in .exe (Windows) or .app (Mac).
If you receive an email with an attachment that claims to be a resume but ends in .exe, do not open it — that is a program, not a document, and it could be malicious. If a file ends in something you do not recognize, search the internet for that extension before opening it. Scammers often hide program files inside documents by using double extensions like "Invoice.pdf.exe" — the extension you see first is a trick, and the real extension at the very end is what matters.
Common file extensions and what they mean
| Extension | File Type | What Opens It |
|---|---|---|
| Document (read-only) | Adobe Reader, web browser, or preview app | |
| .docx | Word document | Microsoft Word, Google Docs, or LibreOffice |
| .xlsx | Spreadsheet | Microsoft Excel, Google Sheets, or LibreOffice |
| .jpg or .png | Image | Photo viewer, web browser, or image editor |
| .mp4 or .mov | Video | Video player or web browser |
| .exe | Program or installer (Windows) | Runs as a program |
| .zip | Compressed folder | Built-in unzip tool or archive software |
| .txt | Plain text document | Notepad, text editor, or web browser |
What to do if you see an unfamiliar extension
If a file ends with an extension you do not recognize, do not open it when ready. Instead, right-click the file (or Control-click on Mac) and look at the "Type" or "Kind" field in the information window. This will tell you what category of file it is. You can also search the internet for the extension plus the word "file" — for example, ".dmg file" — to learn what it is and whether it is safe to open.
If someone sent you the file and you were not expecting it, ask them what it is before opening it. Scammers sometimes send files with unusual extensions to trick people into running programs that steal passwords or install unwanted software. Seeing the extension gives you a chance to stop and think before you click.
Frequently Asked Questions
Will showing extensions break anything on my computer?
No. Showing extensions only changes what you see on the screen — it does not change how your computer works or how files open. You can turn it off anytime if you prefer not to see them.
What if I accidentally change a file extension?
If you rename a file and accidentally delete or change the extension, the file may not open correctly. To fix it, right-click the file, select Rename, and type the correct extension back in. If you are not sure what the extension should be, undo the change by pressing Ctrl+Z (Windows) or Command+Z (Mac) when ready.
Can I hide extensions again after turning them on?
Yes. On Windows, go back to View and uncheck "File name extensions". On Mac, go back to Finder Preferences, Advanced, and uncheck "Show all filename extensions". The setting will turn off when ready.
Why do some files not show an extension even after I turn this on?
Some files, especially on Mac, genuinely do not have an extension. This is normal. You can still right-click the file and check its type in the information window to see what kind of file it is.
Is it dangerous to show file extensions?
No — showing extensions actually makes your computer safer because you can see what type of file something really is before you open it. Hiding extensions is what makes it easier for scammers to trick you.