To hide a file in Windows 11, right-click it in File Explorer, select Properties, check Hidden under Attributes, and select OK. The file disappears from view as long as File Explorer’s Hidden items option is turned off. These steps work the same in Windows 11 Home and Pro.
Hiding keeps a file out of sight, not out of reach: anyone using your account can show hidden items in two clicks. If the file is private, pair hiding with one of the protection options near the end.
What “hidden” actually does
Every file and folder has a few on/off markers called attributes. Hidden is one of them. When it’s on, File Explorer and the desktop skip the item in normal views. Nothing else changes: the file stays in the same folder, keeps its name and contents, opens normally if you type its full path, and isn’t encrypted or password protected. That makes hiding good for decluttering a shared PC or keeping something from casual glances, and not good for protecting anything sensitive.
Hide a file or folder with File Explorer
- Open File Explorer. Select the folder icon on the taskbar or press Windows key + E.
- Find the item. Go to the file or folder you want to hide. To hide several at once, hold Ctrl and click each one.
- Open Properties. Right-click the selection and choose Properties (or press Alt + Enter). The General tab opens.
- Check Hidden. At the bottom of the General tab, under Attributes, check the Hidden box, then select Apply.
- Choose what a folder hides. For a folder, Windows asks how far to apply the change. Apply changes to this folder only hides just the folder. Apply changes to this folder, subfolders and files marks everything inside as hidden too, so the contents stay hidden even if someone opens the folder by its path. Pick one and select OK.
- Select OK to close Properties.
If the item turns faded instead of disappearing, File Explorer is set to show hidden items. Select View > Show on the File Explorer toolbar and clear the check next to Hidden items. The item vanishes, and this setting applies to every folder, not just the one that’s open. Windows marks some of its own folders the same way, which is why you need hidden items on before you can find AppData in Windows 11 by browsing.
Hide files with Command Prompt
The attrib command sets the same Hidden attribute. It’s handy for many files at once, or for scripts.
- Select Start, type cmd and open Command Prompt. You don’t need administrator rights for files in your own folders.
- Go to the folder that holds the item. For example: cd “C:\Users\Priya\Documents\Taxes”
- Hide one file with attrib +h “2025 return.pdf”, or a folder with attrib +h “Receipts”. Put quotes around any name that contains spaces.
- To hide everything inside the current folder, including subfolders, run attrib +h /s /d. The /s switch includes subfolders’ files and /d includes the folders themselves.
The command prints nothing when it works. Run dir /a:h in the same folder to list what’s now hidden. Some online guides add +s to mark the item as a system file too. Skip that: it doesn’t add real protection, and Microsoft’s documentation notes that once the System or Hidden attribute is set, you have to clear it before you can change other attributes, which makes later cleanup more confusing.
Keep a hidden folder out of search results
Hiding a folder isn’t a reliable way to keep its files out of Windows Search, so don’t count on it. If search results matter, go to Settings > Privacy & security > Search (called Searching Windows on some versions) and use the option to exclude a folder (labeled Add an excluded folder on current Windows 11 versions), then pick the folder. You can remove it from that list later to let search find it again.
Unhide files and folders
- In File Explorer, select View > Show > Hidden items so hidden items appear with faded icons. This is the path Microsoft gives for viewing hidden files and folders in Windows 11.
- Right-click the item and select Properties.
- Clear the Hidden box and select OK. For a folder, choose whether to unhide just the folder or everything in it.
- Turn Hidden items back off if you only switched it on to find the file.
From Command Prompt, use the minus sign instead: attrib -h “Receipts”, or attrib -h /s /d inside a folder to unhide its contents. More detail on revealing hidden items is in the steps to show hidden files on Windows 11. On a Windows 10 PC, the ribbon looks different; see how to show hidden files in Windows 10 instead.
When you need real privacy, not just hiding
Pick the option that matches who you’re keeping the file from.
- Other people who use this PC: give each person their own account. A standard user can’t open another person’s personal folders, so your Documents stay private without hiding anything. Here’s how to create a new user on Windows 11. Administrators can still get into other accounts’ files, so keep admin rights to yourself.
- Anyone who signs in as you: on Windows 11 Pro, Enterprise or Education, you can encrypt a file or folder: right-click it, select Properties > Advanced, check Encrypt contents to secure data, then OK, Apply and OK. Microsoft’s guide to encrypting a file or folder notes that this isn’t available in the Home edition, which is why the checkbox is greyed out there. Encrypted files open normally for your account, so this guards against other accounts and someone who removes the drive, not against someone using your unlocked session.
- Anyone who has your OneDrive or your unlocked PC: OneDrive’s Personal Vault is a folder that needs a second check (such as a PIN, fingerprint, face or a code) to open and locks itself after a period of inactivity. Without a Microsoft 365 Personal or Family plan, it holds only three files.
- A thief who takes the laptop: turn on Device encryption (Settings > Privacy & security > Device encryption, available on many Home PCs) or BitLocker on Pro. It encrypts the whole drive, so files can’t be read by pulling the drive out. Save the recovery key first; you’ll need it if Windows ever asks.
Free password-protected archives and third-party “folder lock” apps are often suggested elsewhere. They aren’t part of Windows, and a forgotten password usually means the files are gone, so the built-in options above are the safer choice. When a file needs a real password rather than just being out of sight, these ways to password protect a file in Windows 10 compares encrypted archives, EFS and BitLocker.
If hiding doesn’t work as expected
- The file is still visible but faded. Hidden items is turned on. Clear it under View > Show.
- The file still shows up in a recent list. Shortcuts and “recent” lists (in File Explorer or in the app you opened it with) can keep pointing to a hidden file. Right-click the entry and remove it from the list.
- “Access denied” in Command Prompt. The file belongs to another account or is a system file. Use your own folders, or open Command Prompt as administrator only if you understand what the file is.
- You can’t find what you hid. Turn on Hidden items, then search the folder by name, or run dir /a:h /s from the top folder in Command Prompt.
Common questions about hiding files in Windows 11
Does hiding a file free up space or delete it?
Neither. A hidden file uses exactly the same disk space as before and is still on the PC. If you want the space back, delete the file instead; if you want it gone from this PC but kept, move it to an external drive.
Can I hide a file from my own family on a shared account?
Only loosely. On a shared account, anyone can turn on Hidden items. Separate accounts are the real fix; the Personal Vault is the next best option.
Can I hide a whole drive?
Windows can remove a drive’s letter in Disk Management so it stops appearing in File Explorer, but apps and shortcuts that use that drive stop working too, and it isn’t protection either. For a USB drive or second drive with private files, BitLocker (on Pro) is the safer choice.
Try it first on a test file: hide it, confirm it disappears, then unhide it, so you know exactly how to get your real files back.
Matthew Burleigh has been a freelance writer since the early 2000s. You can find his writing all over the Web, where his content has collectively been read millions of times.
Matthew received his Master’s degree in Computer Science, then spent over a decade as an IT consultant for small businesses before focusing on writing and website creation.
The topics he covers for MasterYourTech.com include iPhones, Microsoft Office, and Google Apps.
You can read his full bio here.