Password protection in Word works differently depending on whether you want to lock the file itself or restrict what readers can do inside it
Word offers two separate password features. The first locks the entire file so nobody can open it without the password — this is the strongest protection and works the same way across Windows, Mac, and online versions. The second lets you open a document normally but restricts editing, printing, or copying, which is useful when you want to share a document but prevent changes. Most people want the first option.
The steps differ slightly between Word on your computer and Word online. Both take less than a minute once you know where to look.
Key Takeaways
- File-level passwords (which prevent anyone from opening the document without the password) work the same way in Word on Windows, Mac, and the web.
- Restriction passwords (which let people open the file but prevent editing or printing) are set through the Info menu and offer more granular control over what readers can do.
- If you forget a password you set on a Word document, Microsoft cannot recover it — you will need to recreate the file.
- Password-protecting a file does not back it up or prevent accidental deletion, so keep a separate copy in case something goes wrong.
How to password-protect a Word file on Windows or Mac
Open the document you want to protect. Click File in the top-left corner, then select Info from the left sidebar. Look for a button labeled Protect Document — on Windows it appears on the right side of the screen; on Mac it is in the center. Click it and choose Encrypt with Password.
A dialog box will appear asking you to enter a password. Type it in, then click OK. Word will ask you to type the password again to confirm it. Once you do, click OK again. The next time anyone opens this file, they will see a password prompt before the document loads.
Write down the password somewhere safe — not in the document itself. If you forget it, you cannot recover the file. Microsoft does not store passwords and cannot unlock documents for you.
How to password-protect a Word file online
If you are working in Word on the web (through OneDrive or SharePoint), the process is similar but slightly different. Open your document and click File in the top-left corner. Select Info, then look for Protect Document and click it. Choose Encrypt with Password.
Enter your password twice in the dialog that appears, then click OK. The file is now encrypted. Anyone who tries to open it from your OneDrive or SharePoint will need to enter the password first.
Restricting editing without a full password
If you want people to be able to open the document but prevent them from making changes, use the restriction feature instead. Open the document, go to File > Info, click Protect Document, and select Restrict Editing.
A panel will appear on the right side. Check the box next to Limit Formatting to a Selection of Styles or Allow Only This Type of Editing depending on what you want to prevent. If you choose the editing option, you can select whether readers can make tracked changes, fill in forms only, or view the document without any edits allowed. Click Yes, Start Enforcing Protection and set a password if you want one.
This method is useful for forms or templates where you want readers to fill in specific fields but not change the overall structure. It is not as secure as file-level encryption because someone determined enough can remove the restrictions, but it prevents accidental changes.
What happens when someone tries to open a password-protected document
When a reader opens a file you have encrypted with a password, they will see a dialog asking them to enter the password before the document appears. They type it in and click OK. If they enter the wrong password, they get an error message and can try again.
There is no limit to how many times someone can try to guess the password, so choose something that is not easy to figure out. Avoid birthdays, names, or simple sequences. A mix of uppercase and lowercase letters, numbers, and symbols is strongest.
Removing a password from a Word document
If you want to remove password protection from a file you created, open it (you will need to enter the password), 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.
If you forgot the password to your own document, you cannot remove it without recreating the file from scratch. Word does not have a password recovery feature.
Password protection vs. other security options
Passwords are not the only way to control access to a Word document. If your file is stored on OneDrive or SharePoint, you can also use sharing permissions — you decide who can view, edit, or comment on the file without needing a password. If the document is on your computer, password protection is your main option.
Password protection encrypts the file itself, so even if someone copies it to another computer, they still cannot open it without the password. Sharing permissions only work within OneDrive or SharePoint and do not protect the file if it is downloaded and moved elsewhere.
Frequently Asked Questions
Can I password-protect just part of a Word document?
No, password protection applies to the entire file. If you want to lock only certain sections, use the restriction feature instead, which lets you specify which parts readers can edit. You can protect specific sections by selecting them and using Protect Document > Restrict Editing.
What if I password-protect a document and then forget the password?
You cannot recover it. Microsoft does not store passwords and has no way to unlock files. You will need to recreate the document from a backup or from memory. This is why it is important to store passwords somewhere safe outside the document.
Does password protection work if I email the document to someone?
Yes. The password protection is built into the file itself, not dependent on email or storage location. When the recipient opens the attachment, they will see the password prompt regardless of how they received it.
Can someone remove a password I set on a Word document?
Not easily. File-level encryption in Word uses strong encryption that is not practical to break. Restriction passwords (the editing kind) can be removed more easily by someone with technical knowledge, but file-level passwords are secure.
Is password protection the same as making a document read-only?
No. Read-only means someone can open and view the file but cannot save changes — they can still copy text and take screenshots. Password protection prevents the file from opening at all without the correct password, which is much stronger security.