How to encrypt files with EFS Encryption on Windows 10

EFS Encryption is present in Windows OS out of the box. It is shipped together with BitLocker encryption that is also shipped out of the box. Though they work in the same manner, the main difference between the two is the fact that EFS is used to encrypt the files and folders with respect to the user whereas Bitlocker is user independent. It will just encrypt the selected partition for all the users present for the machine. This means that a file encrypted by EFS can only be made unreadable for one user but will be readable once signed in with another account. Now, let us see how to encrypt files with EFS on Windows 10/8/7.

How to encrypt files with EFS on Windows

We will be covering two methods of encrypting files with EFS on Windows 10, but along with that, we will also check out how to encrypt folders with EFS on Windows 10. Encrypting files and folders separately is not much different, but we will check it out anyway just to keep things clear.

1: Encrypt using Advanced File Attributes

First, let us check out how to encrypt files using Advanced File Attributes. Start by selecting the file that you wish to encrypt using EFS.

Now, right-click on it and select Properties.

Under the section called Attributes in the General tab, click on the button called as Advanced. It will now open a mini window called Advanced Attributes.

Under the section called Compress or Encrypt attributes, check the option labeled as Encrypt contents to secure data.

Click on OK.

It will give you a prompt reconfirming if you really want to encrypt the file or if you want to encrypt the parent folder as well. Select the option that sounds the best to you and then, click on OK.

Then click on Apply and then click on OK.

This will encrypt your select file on Windows 10/8/7 using EFS Encryption.

Now, if you wish to encrypt the folder only and not the files inside that folder, you can do that too.

All you need to do is, instead of selecting the file you wanted to encrypt you select the folder.

Let us check how to do that in detail.

Start by selecting the folder that you wish to encrypt using EFS.

Now, right-click on it and select Properties.

Under the section called Attributes in the General tab, click on the button called as Advanced.

It will now open a mini window called Advanced Attributes. Under the section called Compress or Encrypt attributes, check the option labeled as Encrypt contents to secure data.

Click on OK.

It will give you a prompt reconfirming if you want to encrypt the folder or if you want to encrypt the files and folders inside it as well. Select the option that says just encrypt the folder and then, click on OK.

Then click on Apply and then click on OK.

This will encrypt your select folder on Windows 10/8/7 using EFS Encryption.

2: Encrypt using Command Prompt

Start by pressing WINKEY + X button combo or right-click on the Start button and click on Command Prompt (Admin) or just search for cmd in the Cortana search box, right click on the Command Prompt icon and click on Run as Administrator.

Now, if you wish to encrypt a file using EFS on Windows 10/8/7, type in the following command,

cipher /e "<PATH>"

Here, replace with the full address of the file including the extension.

Now, hit Enter.

encrypt files with EFS

Type in exit to close Command Prompt.

Your selected file will now be encrypted with EFS.

Now, if you happen to be working with a folder, it would be somewhat tricky and slightly different.

First of all, Start by pressing WINKEY + X button combo or right-click on the Start button and click on Command Prompt (Admin) or just search for cmd in the Cortana search box, right click on the Command Prompt icon and click on Run as Administrator.

Now, if you wish to encrypt a folder using EFS on Windows 10/8/7, type in the following command,

cipher /e "<PATH>"

Note that, the above command will just encrypt the folder.
If you wish to encrypt the folder and other files and folders inside it, you will have to use this command,

cipher /e/s:"<PATH>"

Type in exit to close the Command Prompt window.

This is how you encrypt files and folders on Windows 10/8/7 with EFS Encryption.

Next, we will see how to decrypt EFS Encrypted Files and Folders tomorrow.

Posted by on , in Category Windows with Tags
Ayush has been a Windows enthusiast since the day he got his first PC with Windows 98SE. He is an active Windows Insider since Day 1 and is now a Windows Insider MVP. He has been testing pre-release services on his Windows 10 PC, Lumia, and Android devices.

One Comment

  1. You can add Encrypt and Decrypt to the right click context menu by adding this entry into the registry:

    Open Regedit.

    Navigate to: HKEY_CURRENT_USERSoftwareMicrosoftWindowsCurrentVersionExplorerAdvanced

    Create a new 32-bit DWORD value (in the right pane) here named EncryptionContextMenu and set its value data to 1. If you are running 64-bit Windows 10, you still need to create a 32-bit DWORD value.

    Close Registry Editor and reboot. You can now encrypt and decrypt files without the hassle.

    If you have never used the EFS before, you’ll be prompted to backup your private key when you encrypt your first file. You’ll only need to do this once and is recommended you keep the key safe on a flash drive so you can recover your data if you ever format or have to reinstall your machine. Even if you use the same credentials, the SAM (Security Account Manager) file changes each time, creating a new password hash and as EFS uses the SAM file to encrypt your data, make sure you back up your key. Also, you cannot encrypt the SAM file to prevent anyone from getting your user credentials.

Leave a Reply

Your email address will not be published. Required fields are marked *


9 + 9 =