How to Lock a Folder in Windows 11

The built-in way starts with a right-click, but there are other ways with additional software

What to Know

  • Use W11 password: Right-click the folder > Properties > Advanced > Encrypt contents to secure data.
  • Compress & lock folder with any password with 7-Zip. Right-click it > See more options > 7-Zip > Add to archive.
  • To hide the folder and lock it with a password, use Wise Folder Hider.

This article describes three ways to lock a folder in Windows 11. There's one built-in method and two third-party methods, all completely free.

How to Encrypt Folders in Windows 11

The easiest way to lock a folder is to enable encryption. Doing this prevents other computer users from opening/viewing your files. You have to be logged in to your account in order to open the files in the folder that you lock.

This is built-in to Windows 11, and it's really easy to turn on:

  1. Locate the folder you want to lock, and then right-click it and choose Properties.

  2. From the General tab, select Advanced toward the bottom.

  3. Select Encrypt contents to secure data.

    The General tab, the Advanced button, and 'encrypt contents to secure data' highlighted on the Windows 11 desktop.
  4. Choose OK to save, and then OK again on the folder's properties window.

  5. Choose Apply changes to this folder, subfolders and files > OK to ensure that any folders in this one are also locked.

    The 'Apply changes to this folder, subfolders and files' highlighted for a folder.
  6. You're done now! Windows 11 places a lock icon on the folder to show it's encrypted behind your user password. Now, if anyone wants to open the files in that folder, they must be logged in under your user account.

    A lock icon on a Windows folder highlighted to show it's a locked folder.

    Continue these steps to back up your file encryption key, and avoid permanently losing access to your locked files. To start, search windows for certmgr.msc.

  7. Navigate to Personal > Certificates using the left pane.

  8. Select the items that say Encrypting File System, right-click the selection and choose All Tasks > Export.

    All Tasks and Export highlighted in certmgr.
  9. Walk through the Certificate Export Wizard by going to Next > Yes, export the private key > Next > Next (accept the defaults).

    'Yes, export the private key' highlighted in Certificate Export Wizard.
  10. Choose Password, enter a password for the private key, and then press Next.

    Password area highlighted in Certificate Export Wizard.
  11. Select Browse, give the PFX file a name, and save it somewhere you'll remember.

  12. Press Next > Finish which completesthe wizard. If you need to use this certificate in the future, open it from wherever you saved it.

How to Password Protect a Folder on Windows 11

There isn't a built-in function in Windows 11 which assigns a unique password to each folder you want to lock. There are, however, plenty of third-party software programs that can do the job.

Here are two examples:

7-Zip: Make Compressed Locked Folders

7-Zip is an archive tool. That means it can compress the folder while applying a password to it. You can share the locked folder with anyone, even if they don't have 7-Zip installed, but the files within the folder can't be opened until the right password is provided.

  1. Download 7-Zip and then install it.

  2. Right-click the folder you want to lock, and go to See more options > 7-Zip > Add to archive.

  3. Make the following adjustments:

    • Change Archive format to 7z
    • Select Create SFX archive
    • Provide a password
    • Select Encrypt file names
    7z, 'create sfx archive', password boxes, and 'encrypt file names' all highlighted.

    Feel free to also edit the other settings on that screen, like the new file's name and location or the compression level.

  4. Select OK to save and create the locked folder.

    Now, you can open the newly made EXE file to see a password prompt. Enter the password you made earlier to unlock the folder. This file can be shared with anyone, and they'll get the same password prompt.

    7-Zip 'Enter password' box highlighted.

    The options we enabled above for the self-extracting, password-protected archive didn't include the option to remove the original folder. To ensure nobody can access the original files, delete the folder or move it somewhere private.

Wise Folder Hider: Make Hidden Locked Folders

Wise Folder Hider can hide a folder so it's not visible on your computer like regular folders are. It can also put a password on the folder so that if someone did find it, they can't open it without supplying that password. This program can secure your hidden folder behind two passwords.

  1. Download and install Wise Folder Hider.

  2. At the first launch, you're asked to make a login password. This is the first layer of security this program offers. You must first enter this password to even use the software to unlock a locked folder later.

    Wise Folder Hider 'create password' prompt.
  3. From the Hide File tab, select Hide Folder at the bottom, select the folder you want to hide and press OK to add it to the queue. We highlighted the folder 'Secrets' so you can see the steps. You'll obviously pick your own folder(s).

    'hide folder' button, 'secrets' folder, and 'ok' button highlighted in Wise Folder Hider.
  4. Select the arrow and choose Set password.

    The 'Set Password' menu item highlighted in Wise Folder Hider.
  5. Enter a password into the prompt, select OK to save it, and then OK again on the confirmation box.

    wise folder hider 'set password' prompt
  6. You can now close the program. When you want to view/use this folder, open Wise Folder Hider, supply the login password from Step 2, and then select Open next to the folder to enter that password.

    Wise folder hider 'hide file', 'enter password' prompt, and 'Hide Folder' button highlighted.

"Locked folder" also refers to a folder whose files are being used by another process, making them unable to be edited or deleted. See How to Move, Delete, and Rename Locked Files for more on how those files work. This differs from a folder that's intentionally locked behind a password.

Choosing a Folder Lock Method

Of the three methods covered above, how do you know which one to choose? Here are some things to think about:

  • The first technique is useful for multi-user computers. If you share your computer with someone with their own user account, encrypting the folder will stop them from opening its files. They can still delete the folder and even view the filenames, but they can't open the files in that folder. Use this method if you don't want to remember a new password.
  • Use 7-Zip to lock the folder if you want to choose a different password from your Windows user account password. This method is also useful when sharing the locked folder, copying it elsewhere, and retaining its password protection.
  • Wise Folder Hider is great if you want to protect the folder behind two different passwords and/or if you want the folder to appear invisible to others using the computer.
FAQ
  • How do I change my user folder name in Windows 11?

    If you're the administrator, you can change the names of user profiles. Search for Computer Management, from the desktop, and then select it and go to Local Users and Groups > Users and right-click Administrator and choose Rename. Changing the account name will update the user folder for that account.

  • Where is the startup folder in Windows 11?

    You can quickly open the startup folder in Windows 11 with the Run command. Press Windows + R, and then type shell:startup. When you select OK, the startup folder will open.

Was this page helpful?