Summary

To password protect your text file in Windows, download and install the free7-Ziptool, then restart your PC. Locate your text file, right-click it, and select 7-Zip > Add to Archive. Enter your password in both “Enter Password” and “Reenter Password” fields. Then, select “OK.”

If you’ve got a text file containing sensitive information, it’s a good idea to protect it with a password. While Windows hasn’t got a built-in feature to add password-protection to text files, you can use a free and open-source utility called 7-Zip toprotect your files. Here’s how it works.

Select 7-Zip > Add to Archive.

With 7-Zip, you basically create a compressedZIParchive and add to it your TXT,LOG,RTF,DOCX, or any other kind of text file. You thenpassword-protect this ZIP file, which results in locking your zipped text file. Later, you canuse any archive viewer(including 7-Zip, WinRAR, WinZIP, etc) to view your text file as well as remove password-protection from your file.

Add Password Protection to Your Text File

To start protecting your text file, launch your preferred web browser on your Windows PC and open the7-Zipsite. Download and install this free tool on your PC, thenrestart your PC.

When your PC turns back on,launch File Explorerand find the text file you want to lock.Right-clickthis file, and in the menu that opens, choose 7-Zip > Add to Archive.

Enter password in the "Encryption" section and click "OK."

You’ll see an “Add to Archive” window. Here, in the “Encryption” section, click the “Enter Password” field and type the password you want to use to protect your file. Then, enter the same password in the “Reenter Password” field.

If you want to make sure your ZIP file is secure, learnhow to choose a strong password and remember it too.

A password-protected ZIP file in File Explorer.

When you’re done, at the bottom of the window, click “OK.”

7-Zip has created a password-protected ZIP archive in the same folder as your text file. Your text file is now locked inside this archive, and it will only open when you enter the correct password.

Select 7-Zip > Open Archive.

Note that your original text file is still present in the same folder. You’ll want to delete it so that other users can’t access it. Do that by right-clicking the file, pressing and holding down the Shift key, and choosing “Delete” in the menu. Thispermanently deletes your text filefrom your PC.

How to View Your Password Protected Text File

When you want to access your locked text file, all you have to do isopen your password-protected ZIP archiveusing any archive opener tool. All tools work the same way and will prompt you to enter your password before opening your text file.

To open your ZIP with 7-Zip, locate your archive in File Explorer. Right-click the archive, and in the menu that opens, choose 7-Zip > Open Archive.

Open the text file.

If 7-Zip isset as the default archive viewer, you can double-click your archive to open it with the tool.

The 7-Zip window will display your text file. Double-click the file to open it.

Type password in “Enter Password” and click “OK."

The app will ask you to enter your password. Click the “Enter Password” field, type your password, and press Enter or select “OK.”

If your password was correct, 7-Zip will open your text file. And that’s all.

Select 7-Zip > Extract Here.

How to Remove Password Protection From Your Text File

In the future, if you’d like to remove the password from your text file, simplybring your text file out of your locked ZIP archive.

To do that, right-click your archive and choose 7-Zip > Extract Here.

Type password in “Enter Password” and select “OK."

Type your password in the “Enter Password” field and press the Enter key or click “OK.”

7-Zip will extract your text file in the same folder as the archive file. you may now delete the archive if you no longer need it.

And that’s how you can easily and quickly protect the data in your text files on your Windows computer. Stay safe!

Related:How to Hide Files and Folders on Every Operating System