Password protection locks your document so only someone with the password can open it
When you password-protect a Word document, Windows or Mac encrypts the file itself. Anyone who tries to open it sees a password prompt before they can read, edit, or print anything inside. The document stays locked until someone enters the correct password. This works the same way whether you use Microsoft Word on your computer, Word Online in a browser, or compatible programs like LibreOffice.
Password protection is different from sharing settings. Sharing controls who can see a file in OneDrive or Google Drive. Password protection controls who can open the actual file, even if they somehow get the file itself. You can use both at once — a document can be password-protected and also shared with specific people.
Key Takeaways
- Open the document, go to File > Info > Protect Document, and choose "Encrypt with Password" to set a password in Word on Windows or Mac.
- Word Online (in a browser) does not have a built-in password feature, so you must use the desktop version of Word or save the file locally first.
- Once you set a password, you must enter it every time you open the document — there is no way to bypass it if you forget.
- Password protection encrypts the entire file, so someone cannot open it at all without the password, even if they have the file on their computer.
How to password-protect a Word document on Windows
Open the document you want to protect. Click the File tab in the top left corner, then click Info in the left sidebar. You will see a button labeled Protect Document with a dropdown arrow next to it. Click that arrow and select Encrypt with Password.
A dialog box will appear asking you to enter a password. Type the password you want to use. Word will not show you the characters as you type — you will see dots or asterisks instead. Click OK. Word will ask you to enter the password again to confirm you typed it correctly. Type it the same way and click OK again. Save the document. The next time anyone opens it, they will see a password prompt.
If you forget the password, there is no recovery option. Microsoft cannot reset it for you, and no tool can remove it without the original password. Write the password down somewhere safe if you think you might forget it.
How to password-protect a Word document on Mac
Open the document. Click File in the menu bar at the top, then click Info. Look for a button that says Protect Document and click the dropdown arrow next to it. Select Encrypt with Password.
Enter your password in the dialog that appears. Like Windows, Mac will hide what you type. Click OK, then enter the password again to confirm it. Click OK once more and save the document. The password protection is now active.
Why Word Online does not have password protection built in
If you use Word in a web browser (Word Online), you will not find an Encrypt with Password option. Word Online runs in the cloud and relies on your Microsoft account login and OneDrive sharing settings to control access. Microsoft designed it that way because the file is already stored on their servers with your account protecting it.
If you need password protection and you only have Word Online, read the document to your computer, open it in the desktop version of Word, add the password, and then upload it back to OneDrive. Alternatively, you can use a third-party tool to encrypt the file after you read it, though that adds an extra step.
What happens when someone tries to open a password-protected document
When a password-protected Word document is opened, the person sees a dialog box that says "This document is password protected" with a field to enter the password. They must type the correct password to proceed. If they enter the wrong password, Word tells them it is incorrect and lets them try again.
Once they enter the correct password, the document opens normally. They can read, edit, and print it like any other document. If they close the file and open it again later, they will need to enter the password again — Word does not remember it between sessions.
The difference between opening and editing passwords
Some password-protected documents have two passwords: one to open the file and one to edit it. If a document has only an opening password, anyone who enters it can make changes. If it has an editing password, someone can open the document and read it without a password, but they need a different password to make changes.
Word lets you set both. When you use Encrypt with Password, you are setting an opening password — the document cannot be opened at all without it. To set an editing password separately, you would use a different feature under File > Info > Protect Document called "Restrict Editing". That feature is less common and works differently, so check Word's help if you need that specific setup.
How to remove password protection from a Word document
Open the password-protected document and enter the password when prompted. Once it is open, go to File > Info > Protect Document and click Encrypt with Password again. A dialog will appear with the password field empty. Leave it blank and click OK. Save the document. The password protection is now removed.
You can only remove the password if you know it. If you have lost the password and do not have a backup copy of the unprotected document, the file is locked permanently.
Frequently Asked Questions
Can I password-protect a Word document in Google Docs or LibreOffice?
Google Docs does not have a built-in password feature. LibreOffice Writer does — go to Tools > Protect Document > Password and follow the same steps as Word. If you use Google Docs, read the file as a .docx, open it in Word or LibreOffice, add the password, and upload it back.
What if I share a password-protected document with someone on OneDrive?
They will need both the OneDrive sharing permission and the document password. Sharing the file gives them access to read it, but they still cannot open it without entering the password you set. You must tell them the password separately — do not include it in the sharing link.
Does password protection work if someone has the file on a USB drive or email?
Yes. Password protection is built into the file itself, not tied to where it is stored. Whether the file is on a USB drive, in an email attachment, or on someone's computer, they cannot open it without the password.
Is password protection the same as making a document read-only?
No. Read-only means someone can open and view the document but cannot save changes to it. Password protection means they cannot open the document at all without the password. You can use both — a document can be password-protected and also set to read-only once opened.
Can I password-protect just one section of a Word document?
No. Password protection encrypts the entire file. If you need to protect only certain sections, you would have to split the document into separate files, password-protect the sensitive one, and keep the other unprotected.