No, Windows does not let you add a password to a file from the right-click menu, so how you secure a file with a password depends on the file type. Word and Excel have a password option built into the app, while a PDF needs a PDF tool. The same limit shows up in older Windows guidance, which says Windows 8 did not allow you to protect a file or folder with a password and points to free tools instead. [1] You may also find this useful: How to Password Protect a File in Windows 11.
Word is the easy case: Microsoft documents a way to protect a Word document with a password from inside the app. [2] Any other file type, such as a photo, a text file or a spreadsheet you cannot open in Office, needs a fallback, which comes later.
In Word, go to File > Info > Protect Document > Encrypt with Password, type a password twice, and save the file so the password takes effect. [3] Keep the password easy for you to remember, because Word passwords are case-sensitive. [2]
What should you know before you start?
Start by matching the method to the file type, because Windows has no single password switch for every file. Word documents have a built-in password option, while PDFs and other files need a different tool. Pick the route first, then set the password.
For Word, the built-in option is documented for Word for Microsoft 365, Word 2024, 2021, 2019 and 2016, so the steps do not depend on whether your PC runs Windows 10 or 11. [2] The Office steps are the same on both. Windows 10 has reached end of support, so if you still use it, consider moving to Windows 11 for security updates. That is a separate decision from how you protect a file. For more detail, see How to Encrypt a File in Windows 11 (and Windows 10).
Keep an unprotected backup first
Before you add a password, copy the original file to a safe place, such as an external drive or a folder you control. If you forget the password, you may not be able to open the file at all, and the backup is your only way back in. Delete nothing until you have tested that the protected copy opens with the password.
Use a strong, unique password
Protecting files with a strong password is very important for keeping your data safe from others. [1] A strong password is long and not based on your name, birthday or a common word. Make it unique, too: do not reuse the password from your email or bank account.
A passphrase of several unrelated words, with a number or symbol mixed in, is easier to remember than random characters. Store it in a password manager rather than on a sticky note beside your computer.
How do you password protect a Word document?
Word has a built-in password option, and you reach it from the File menu. Here is the route, which follows Microsoft’s steps for Word [2] and the Windows method described by a third-party guide [4].
Open the document you want to protect, then go to File > Info.
Choose Protect Document, then select Encrypt with Password.
Enter your password in the box that appears, then confirm it by typing it again.
Save the document.
The password applies once the file is saved, so close the document and reopen it. Word should now ask for the password before it shows any content.
What about Excel?
Excel offers a similar option. Open the workbook, go to File > Info, and choose Protect Workbook. From there, the encrypt-with-password choice works the same way: enter the password, confirm it, and save.
For example, if you keep a household budget in an Excel workbook, set the password there and save before you email or copy the file to a USB drive.
How do you add a password to a PDF?
File Explorer has no option to add a password to a PDF, so you need a PDF tool. Adobe Acrobat is the best-known one, but its price is quite high [5]. A free online protect tool is the simpler route, and Smallpdf’s Protect PDF tool works like this:
Open the Protect PDF tool in your browser and drop your PDF onto the page. [5]
Choose a password and enter it twice, so a typo does not lock you out. [5]
Wait while the tool encrypts the file. [5]
Download the protected copy and save it in a folder you will remember. [5]
The tool encrypts the file with 128-bit AES, which means no one can view the PDF without the password. [5] Smallpdf also says it does not know your password, so keep it somewhere safe. [5]
Uploaded files are not kept for long. Smallpdf says the file is permanently deleted from its servers after two hours, so download the result promptly. [5] Files you send through its eSign tool or share with its file-share feature are the exception. [5]
Online tools still mean sending your file to someone else’s server. For highly sensitive documents, such as tax returns, medical records or ID scans, skip the upload and use a PDF program installed on your own computer instead.
What if your file is not a Word, Excel or PDF document?
If your file is not a Word, Excel or PDF document, you need a fallback: a trusted free tool or an encrypted archive. Older Windows 8 guidance notes that Windows itself did not let you protect a file or folder with a password, and that free tools filled the gap. One example it names, Secure Folder, offers AES 256-bit encryption. [1]
Here is a general way to do it for a photo, a text file or a spreadsheet export:
Choose a trusted free tool. Archive and encryption tools such as 7-Zip, VeraCrypt and AxCrypt appear in a list of free encryption software. [3]
Install it, then put the file you want to protect into an encrypted archive, or add it to the tool’s protected area.
Set a strong password when the tool asks. Some tools also ask for an email address and a password hint, which can help with recovery. [1]
Close the tool, reopen the protected copy and enter the password. The file should open normally.
Only after that test works, delete the unprotected original. Keep a separate backup if the file matters.
The exact menus differ from tool to tool, so follow the on-screen prompts of the one you choose. For example, Secure Folder asks you to click Add and browse to the item you want to protect. [1]
This article stays with the simple route. Encryption in more depth, including what Windows’ own options do and do not cover, has its own guide in this series.
What mistakes should you avoid?
Most password failures come from habits, not from the encryption itself. Four mistakes undo the protection you just added.
Reusing weak or obvious passwords
A password like Contract2025 or your pet’s name is easy to guess, and one reused across accounts is only as safe as the weakest site that holds it. Give each protected file its own long passphrase, such as four unrelated words, rather than a variation of one you already use.
Storing the password next to the file
A sticky note on the monitor or a text file named passwords.txt in the same folder defeats the purpose. Anyone who can reach the document can reach the password too. Keep it in a password manager or somewhere physically separate from the computer.
Sharing the password in the same email as the file
If someone intercepts that one message, they get both the lock and the key. Send the file by email and the password by another channel, such as a text message or a phone call.
This matters because password protection is meant for files you send, such as confidential reports, contracts and personal information. [4] Splitting delivery keeps that protection meaningful.
Assuming a protected file is also backed up
A password controls who can open a file. It does not make a copy of it. If the drive fails or you delete the document by accident, the protected file is gone like any other.
Keep a separate backup, and remember that a backup of an encrypted file is still locked by the same password. Lose the password and both copies are unreadable.
Quick questions about file passwords
Can you password protect a file in File Explorer?
No. File Explorer has no built-in option to put a password on a file or folder. Even an older guide for Windows 8 notes that the system doesn’t let you protect a file or folder with a password, and points to free tools instead. [1] For Word documents, use the password option inside the app instead. [2]
Can you recover a forgotten password?
Don’t count on it. Microsoft’s Word instructions give no recovery route for a document password, so treat a lost password as a lost file unless you kept an unprotected backup. Some third-party tools offer recovery help of their own: one free folder-locking tool asks for an email address during setup, which it can use to recover the password if you forget it. [1] That applies to that tool only, not to Word or PDF files.
Does the password stay when you share the file?
Yes, for a Word document the password is part of the file, so anyone who opens a copy has to enter it. [2] That makes sharing easy, but the recipient also needs the password. Send it by a different route than the file, such as a text message or phone call, so one stolen email doesn’t expose both.
A protected archive made with a third-party tool works the same way: the password travels with the file, not with your PC.
Which method should you use?
Pick the method by file type: Word and Excel files already have password encryption built in, so use that first.[2] For a PDF, use a PDF tool; a free online option such as Smallpdf’s Protect PDF encrypts the file with 128-bit AES after you set a password.[5]
For any other file, put it in an encrypted archive or use a trusted encryption tool. Whichever route you choose, keep an unprotected backup somewhere safe and store the password in a password manager, so a forgotten password never locks you out for good. Your next step: protect one copy of your most sensitive file today, then open it to test the password.
