How to Encrypt a Text File

By David Weedmark

Encrypt any file or folder using the encryption options available in Windows 8.1, without the need of extra software.

When you need to ensure the contents of a text file are secure, use the encryption option available in Windows 7 and Windows 8.1. Encryption makes the file inaccessible without the encryption key.

Step 1

Locate the text file in File Explorer. You can encrypt the text file directly or put it in a new folder and then encrypt the folder. Right-click the file, select Properties and click the Advanced button. Select Encrypt Contents to Secure Data. Note that you can also compress the contents to save disk space. Click OK.

Step 2

Click the Encrypt the File Only option to encrypt the text file. Select the Encrypt the File and Its Parent Folder only if you have placed the text file in a separate folder. Encrypting a Parent Folder encrypts everything in that folder.

Select Encrypt the File and Its Parent Folder.

Step 3

Move the file to any drive that supports encryption using the NTFS file format. Encrypted file names appear green in File Explorer.

Encrypted files are displayed with green text.

If you want to put an encrypted file into a FAT32 formatted USB drive, you need to reformat the drive to NTFS first.


If the destination drive doesn't support encryption, a dialog box may open to warn you that the encryption will be lost. You'll get this notification when moving the file to a FAT32 drive, however you won't get it if you move the file to a cloud-based drive like Google Drive.

Backing Up the Encryption Key

Because encrypted files require the encryption key created by Windows, you could lose access to the file if your computer crashes. After creating an encrypted file, back up the encryption key to a backup drive.

Step 1

Click the Encrypting File System icon that appears in the Windows Taskbar immediately after creating your first encrypted file. If it doesn't appear there, click the Expand arrow to find it.

Click the Encrypting File System icon.

Alternatively, type "encryption" in Windows Search and select Manage File System Certificates.

Step 2

Click Next when the Encrypting File System window opens. Click Next again.

Click Next.

Step 3

Select a backup location drive and folder, then enter a secure password in both Password fields. Click Next once again.

Use a strong password to back up an encryption key.

Step 4

Click the I'll Update My Encrypted Files Later if this is the first time you've encrypted a file. If you have encrypted files in the past, select All Logical Drives to update all of your encrypted files to use this one key. Click Next again to finish the backup process.

Select  I'll Update My Encrypted Files Later.

Sharing Encrypted Files

To access an encrypted file on two different computers, such as a computer at work and at home, you need to export the encryption key to the other computer.

  1. Type "certmgr.msc" in Windows Search and click the Certmgr.msc icon.

  2. Expand the Personal folder by clicking its Arrow and then select the key you made.

  3. Click the Action menu, select All Tasks and click Export to launch the Certificate Export Wizard.
  4. Launch Certmgr on the other computer, open the Personal folder and select Import from the Action menu's All Tasks option. The Certificate Import wizard opens.

Click the Action Menu and select All Tasks to export an encryption key.

To share an encrypted file with another person, such as via a USB drive, the other person must first export his encryption key using Certmgr and give it to you. You then need to import that key using your computer's Certmgr. Then:

  1. Right-click the file you are going to share and select Properties.

  2. Click the General tab, select Advanced and then Details.

  3. Click Add, and then click the certificate in the Select User dialog box. Click OK.