How to Hide Files and Folders in Windows 11

If you share your PC with others or just want to keep certain files private, hiding them is one of the simplest ways to protect your data from prying eyes. Windows 11 offers several built-in options to hide files and folders — whether you want to keep them invisible in File Explorer, prevent access to system files, or add an extra layer of privacy without third-party tools.

In this guide, we’ll show you how to hide files and folders in Windows 11 using File Explorer, Command Prompt, and other advanced methods — and how to unhide them when needed.

Why Hide Files or Folders?

You might want to hide files and folders for reasons like:

  • Keeping personal or sensitive data out of sight.
  • Preventing others from accidentally modifying or deleting important files.
  • Tidying up cluttered directories.
  • Hiding system or configuration files to avoid misuse.

No matter the reason, Windows 11 gives you multiple ways to do it — from basic visibility toggles to advanced command-line methods.

1. Hide Files or Folders Using File Explorer

The quickest way to hide files or folders in Windows 11 is through File Explorer’s Properties menu.

Here’s how:

  1. Press Windows + E to open File Explorer.
  2. Locate the file or folder you want to hide.
  3. Right-click it and select Properties.
  4. Under the General tab, check the box labeled Hidden.
  5. Click ApplyOK.

By default, Windows hides the selected file or folder immediately. It won’t appear in File Explorer unless you’ve enabled “Show hidden items.”

Tip: If you’re hiding an entire folder, you’ll get a prompt asking whether to hide just the folder or the folder plus all its contents. Choose Apply changes to this folder, subfolders, and files to hide everything inside.

2. Use File Explorer’s Ribbon Menu to Hide Items

You can also hide multiple files or folders at once directly from the toolbar.

  1. Select one or more items in File Explorer.
  2. Click the View menu on the top toolbar.
  3. Hover over Show, then click Hidden items to toggle visibility.
  4. Alternatively, right-click selected files → Properties → Hidden → Apply.

Once hidden, those items will disappear from the current view unless you’ve chosen to display hidden files.

3. Hide Files Using the Command Prompt

If you prefer using commands or need to automate the process, you can hide files or folders using the attrib command.

Here’s how:

  1. Press Windows + S, type cmd, and select Run as administrator.
  2. Type the following command, replacing path with your file or folder location: attrib +h "C:\Path\To\Your\FileOrFolder"
  3. Press Enter.

The +h attribute makes the file or folder hidden.

To make it visible again, use:

attrib -h "C:\Path\To\Your\FileOrFolder"

Pro tip: You can combine the hidden attribute with the system attribute (+s) to make the file even harder to find:

attrib +h +s "C:\Path\To\Your\FileOrFolder"

This hides the file from normal search and viewing settings unless “Hide protected operating system files” is disabled.

4. Hide Files Using the Registry (Advanced)

For a more controlled experience, you can modify the Windows Registry to hide system or specific files from appearing, even when hidden items are set to show.

Warning: Editing the registry incorrectly can cause system issues. Always back it up first.

  1. Press Windows + R, type regedit, and hit Enter.
  2. Navigate to: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced\Folder\Hidden
  3. In the right pane, double-click Hidden.
  4. Set the Value data to 2 to keep hidden items invisible (or 1 to show them).
  5. Click OK and restart File Explorer.

This controls whether hidden items can be seen system-wide, regardless of File Explorer settings.

5. Use “Hide Protected Operating System Files” Option

Windows also hides critical system files automatically to prevent accidental deletion. You can adjust this setting manually if you want to hide or reveal those system files.

  1. Open File Explorer.
  2. Click the three-dot menu (⋯)Options.
  3. In the Folder Options window, go to the View tab.
  4. Scroll down and check Hide protected operating system files (Recommended).
  5. Click ApplyOK.

If you disable this option, you’ll see system files like desktop.ini and pagefile.sys — but it’s best to keep them hidden for safety.

6. Hide Folders from Search Results

Even if a file or folder is hidden, it may still show up in Windows Search results. To completely exclude it:

  1. Press Windows + I to open Settings.
  2. Go to Privacy & security → Searching Windows.
  3. Scroll down and click Add an excluded folder under Excluded folders.
  4. Select the folder you want to keep out of search results.

Now Windows Search will ignore that folder entirely, even if someone searches for its contents.

7. Use BitLocker or File Encryption (Optional for Extra Security)

If your goal isn’t just to hide files but also to protect them from unauthorized access, consider encrypting them using BitLocker or Windows’ built-in encryption.

  • BitLocker: Encrypts entire drives — perfect for sensitive data on external or secondary drives.
  • File Encryption: Right-click a file → Properties → Advanced → Encrypt contents to secure data.

This ensures that even if someone finds the file, they won’t be able to open it without your Windows account credentials.

8. How to Unhide Files and Folders

When you’re ready to see your hidden files again, simply reverse the settings:

Using File Explorer:

  1. Open File Explorer.
  2. Click View → Show → Hidden items.

Using Folder Options:

  1. Open File Explorer → Options → View tab.
  2. Under Hidden files and folders, select Show hidden files, folders, and drives.
  3. Click Apply → OK.

Using Command Prompt:

attrib -h "C:\Path\To\Your\FileOrFolder"

Your hidden files will reappear immediately.

Wrapping Up

Hiding files and folders in Windows 11 is quick and effective — whether you’re trying to keep things private, declutter your workspace, or protect sensitive data from accidental changes.

The easiest method is through File Explorer, but for advanced control, you can use the Command Prompt or even tweak Registry settings. And if you need real protection, pairing hidden files with encryption gives you both privacy and security.

Once you’re done, don’t forget to hide system files again to avoid accidental damage — it keeps Windows running smoothly and your PC safe.

Posted by Arpita

With a background in Computer Science, she is passionate about sharing practical programming tips and tech know-how. From writing clean code to solving everyday tech problems, she breaks down complex topics into approachable guides that help others learn and grow.

X