What Is a Hidden File?

It's easy to show hidden files in Windows, but they're hidden for a reason

A hidden file is any file with the hidden attribute turned on. Just as you'd expect, a file or folder with this attribute toggled on is invisible while browsing through folders—you can't see any of them without explicitly allowing all of them to be seen.

Most computers running a Windows operating system are configured by default to not display hidden files.

The reason some files and folders are automatically marked as hidden is that, unlike other data like your pictures and documents, they're not files that you should be changing, deleting, or moving around. These are often important operating system-related files. Both Windows and macOS computers have hidden files.

How to Show or Hide Hidden Files in Windows

You may sometimes need to see hidden files, like if you're upgrading software that requires you to select a certain file that's hidden from normal view or if you're troubleshooting or repairing a specific problem. Otherwise, it's normal to never interact with hidden files.

The pagefile.sys file is a common hidden file in Windows. ProgramData is a hidden folder you may see when viewing hidden items. In older versions of Windows, commonly encountered hidden files include msdos.sys, io.sys and boot.ini.

Configuring Windows to either show, or hide, every hidden file is a relatively simple task. It's easiest in Windows 11: from File Explorer, go to View > Show > Hidden items. In other Windows versions, select or deselect Show hidden files, folders, and drives from Folder Options.

See our How to Show or Hide Hidden Files in Windows tutorial for more detailed instructions.

Remember that most users should keep hidden files hidden. If you need to show hidden files for whatever reason, it's best to hide them again when you're done using them.

Using a free file search tool like Everything is another way to view hidden files and folders. Going this route means you will not need to make any changes to settings in Windows, but you also will not be able to see the hidden items in a regular File Explorer view. Instead, just search for them and open them through the search tool.

Everything Options dialog box and hidden folders
'Everything' program showing hidden folders.

How to Hide Files and Folders in Windows

To hide a file is as straightforward as right-clicking (or tap-and-hold on touch screens) the file and choosing Properties, followed by checking the box next to Hidden in the Attributes section of the General tab. If you've configured hidden files to show, you'll see that the newly hidden file's icon is a bit lighter than non-hidden files. This is an easy way to tell which files are hidden and which aren't.

hidden file attribute

Hiding a folder is done similarly via the Properties menu except that, when you confirm the attribute change, you're asked if you want to apply the change to that folder only or to that folder plus all of its subfolders and files. The choice is yours, and the result is just as clear as it seems.

Choosing to hide just the folder will hide that folder from being seen in File Explorer, but will not hide the actual files contained within. The other option is used to hide both the folder and all the data inside, including any subfolders and subfolder files.

Unhiding a specific file or folder can be done using the same steps mentioned above. So, if you're unhiding a folder full of hidden items and choose to just turn off the hidden attribute for that folder only, then any files or folders inside it will remain hidden.

On a Mac, hide folders with the chflags hidden /path/to/file-or-folder command in Terminal. Replace "hidden" with "nohidden" to unhide the item.

Things to Remember About Hidden Files

While it's true that turning on the hidden attribute for a sensitive file will make it "invisible" to the regular user, you shouldn't use it as a means to safely hide your files from prying eyes. Unhiding a hidden file/folder is easy for anyone to do, as you can see above. Instead, a true file encryption tool or full disk encryption program is the way to go.

Although you can't see hidden files under normal circumstances, it doesn't mean that they suddenly no longer take up disk space. In other words, you can hide all the files you want to reduce visible clutter, but they will still take up room on the hard drive.

When you're using the dir command from the command-line in Windows, you can use the /a switch to list hidden files along with the non-hidden files, even if hidden files are still hidden in File Explorer. For example, instead of using just the dir command to show all the files in a particular folder, execute dir /a instead. Even more helpful, you could use dir /a:h to list only the hidden files in that particular folder.

Hidden files in Command Prompt

Some antivirus software may prohibit changing the attributes of critical hidden system files. If you're having trouble toggling a file attribute on or off, try temporarily disabling your antivirus program and see if that resolves the problem.

Some third-party software, like IObit's Protected Folder and My Lockbox, can hide files and folders behind a password without using the hidden attribute, which means it's pointless in those situations to try toggling the attribute off in order to see the data. Other programs that let you lock a folder in Windows work similarly.

Of course, this is also true for file encryption programs. A hidden volume on a hard drive that's storing secret files and folders that are hidden away from view and only accessible through a decryption password, cannot be opened simply by changing the hidden attribute. Similarly, toggling the hidden attribute on will not encrypt the file like an encryption program can.

In these circumstances, the "hidden file" or "hidden folder" has nothing to do with the hidden attribute; you'll need the original software, the correct password, and/or the keyfile, to access the hidden data.

FAQ
  • How do you create a hidden shared folder?

    On Windows 10, navigate to the folder you want to share in File Explorer, then right-click on it and select Properties > Sharing > Advanced Sharing > Share This Folder. Under Settings, give the folder a name followed by a dollar sign ($), then select Apply > OK > Share. You will need to choose who to share the folder with and give them read/write permissions.

  • How do you make a hidden folder on Android?

    Create a new folder whose file name begins with a dot (.). This tells the Android operating system to ignore the file. It's still viewable in the File Manager, but you can go to Settings > Display Settings and uncheck Show hidden files to hide it there as well.

  • Why is the Appdata folder hidden?

    The Appdata folder is hidden by default because most people have no reason to muck around in it. Since it's a system folder, it's required for many applications running on your computer, and tampering with it could damage your system.

Was this page helpful?