Password protection in Word works differently depending on whether you want to lock the file itself or restrict editing within it
Microsoft Word gives you two separate ways to password protect a document. The first locks the entire file so nobody can open it without entering a password — this is the strongest protection. The second lets people open the document but restricts what they can edit, which is useful when you want to share a document but keep certain parts locked. Which one you need depends on what you're protecting and who you're sharing it with.
Key Takeaways
- To lock an entire Word file with a password, go to File > Info > Protect Document > Encrypt with Password, then type your password twice.
- To restrict editing only, go to File > Info > Protect Document > Restrict Editing, choose what parts people can change, and set a password.
- Password-protecting the file itself prevents anyone from opening it without the password; restricting editing lets people open it but blocks changes to specific sections.
- Word does not show your password as you type it, so write it down somewhere safe before you forget it — there is no recovery option if you lose it.
How to password protect an entire Word document
To lock the whole file so it cannot be opened without a password, open your document in Word and click the File tab at the top left. Then click Info in the left sidebar. You will see a button labeled Protect Document — click it and select Encrypt with Password from the dropdown menu.
A dialog box will appear asking you to enter a password. Type your password in the first field, then type it again in the second field to confirm it. Word will not show the characters as you type — you will see dots instead. Click OK when you are done. The next time anyone tries to open this file, Word will ask for the password before showing the document.
Write down your password and store it somewhere safe. If you forget it, you cannot recover the file. Microsoft does not have a master password or recovery process for encrypted Word documents.
How to restrict editing without locking the entire file
If you want people to be able to open your document but prevent them from changing certain parts, use the Restrict Editing feature instead. Open your document, click File, then Info, then Protect Document, and select Restrict Editing.
A panel will open on the right side of your screen. At the bottom, you will see a checkbox that says Yes, Start Enforcing Protection. Before you check that box, decide what you want to allow: you can let people add comments only, track changes only, or fill in form fields only. Choose the option that matches what you want them to do. Then check the box, set a password, and click OK.
Once you enforce protection, anyone who opens the document will see those restrictions in place. They can still open and read the document without a password, but they cannot make the kinds of edits you blocked. If they try to edit a protected section, Word will tell them they do not have permission.
The difference between file encryption and editing restrictions
File encryption (password protecting the whole document) is stronger security. Nobody can even see the document without the password. This is the right choice if the document contains sensitive information that should not be visible to most people.
Editing restrictions are weaker but more practical for collaboration. The document is readable by anyone, but you control what they can change. This works well when you want to share a template, a form, or a document where only certain sections should be edited. Someone determined could copy the text into a new document and edit it there, so this is not true security — it is just a way to prevent accidental changes.
What happens when someone tries to open a password-protected file
When you send a password-protected Word document to someone, they will see a password prompt the moment they try to open it. The prompt appears before the document loads, so they cannot see any of the content until they enter the correct password. If they type the wrong password, Word will reject it and ask them to try again.
There is no limit to how many times someone can try to guess the password, so a weak password is not very secure. Use a password that combines uppercase letters, lowercase letters, numbers, and symbols if the document contains truly sensitive information.
Removing password protection from a document
If you want to remove password protection from a file you created, open it (you will need to enter the password), then go to File > Info > Protect Document > Encrypt with Password. The password field will be empty. Leave it blank and click OK. The password protection is now removed.
To remove editing restrictions, open the document, go to File > Info > Protect Document > Restrict Editing, and at the bottom of the panel click Stop Protection. You may need to enter the password you set when you created the restrictions.
Password protection in different versions of Word
The steps above work in Word 2016, Word 2019, Word 2021, and Microsoft 365 (the subscription version). The menu locations and button names are the same across all these versions. If you are using an older version like Word 2010 or Word 2013, the steps are similar but the menus may be labeled slightly differently — look for Protect Document under the Review tab instead of under File > Info.
Word Online (the free version you can use in a web browser) does not support password protection. If you need to password protect a document, you must use the desktop version of Word. You can upload a password-protected file to OneDrive or SharePoint, but you cannot create the protection through the web version.
Frequently Asked Questions
Can I password protect just one section of a Word document?
Not directly. You can use Restrict Editing to lock down what people can do (like preventing all edits except comments), but you cannot protect individual sections with different passwords. If you need to protect different parts differently, you would need to split the document into separate files and protect each one.
What if I forget the password to my own document?
There is no way to recover a forgotten password for a Word document. Microsoft does not store your password and cannot reset it. If you forget it, you cannot open the file. This is why it is important to write down your password and store it somewhere secure before you close the document for the first time.
Is password protection in Word secure enough for confidential information?
Word's encryption is reasonably strong for everyday use, but it is not military-grade. If you are protecting documents that contain highly sensitive information like financial records or trade secrets, consider using dedicated encryption software in addition to Word's built-in protection. For most personal and business documents, Word's password protection is sufficient.
Can someone remove password protection if they have the file but not the password?
Not easily. Word's encryption is designed to prevent this. However, specialized password-recovery tools exist online, and some are more effective than others depending on the password strength. This is another reason to use a strong password if the document is truly sensitive.
Do I need to password protect a document if I am storing it in OneDrive or SharePoint?
OneDrive and SharePoint have their own permission systems that control who can see and edit files, but those permissions are separate from password protection. If you want an extra layer of security so that even someone with access to your OneDrive account cannot read the document, password protecting the file itself adds that protection.