Password-protect your Word document to prevent unwanted changes
You can lock a Word document in two ways: password-protect it so only someone with the password can open it, or restrict editing so people can open it but cannot make changes without your permission. The method you choose depends on whether you want to keep the document private entirely, or share it while preventing accidental or intentional edits.
Both options work in Word for Windows, Word for Mac, and Word Online. The steps differ slightly between versions, so this guide covers the most common setup: Word 2019, Word 2021, and Microsoft 365 on Windows.
Key Takeaways
- Password-protecting a document encrypts the entire file so only someone with the password can open it at all.
- Restricting editing lets people open the document but prevents them from making changes unless they know the password.
- Word Online has limited locking options compared to the desktop version, so use the desktop app if you need full control.
- If you forget the password, there is no built-in recovery method — you will need to contact the person who set it or use a third-party tool.
Password-protect a document so only you can open it
This method encrypts your entire document. Anyone who tries to open it will see a password prompt and cannot access the file without the correct password.
On Windows: Open your document in Word. Go to File > Info. Click "Protect Document" and select "Encrypt with Password". Type your password twice and click OK. Save the document. The next time anyone opens it, they will be prompted for the password.
On Mac: Open your document. Go to File > Properties. Under the Security tab, check "Require a password to open this document". Type your password, click OK, type it again to confirm, and click OK. Save the document.
Use a password you can remember but that others cannot guess. Avoid birthdays, names, or common words. A mix of uppercase letters, numbers, and symbols is strongest.
Restrict editing while allowing people to open the document
This method lets you share the document with others, but they cannot make changes without your password. They can read and print it, but any attempt to edit will prompt them for a password. This is useful when you want feedback or want people to review the document without accidentally changing it.
On Windows: Open your document. Go to File > Info. Click "Protect Document" and select "Restrict Editing". On the right side, under "Restrict Formatting and Editing", check "Limit formatting to a selection of styles" or "Allow only this type of editing in the document". Choose "Filling in forms" or "Comments" or "Tracked changes" depending on what you want people to do. Click "Yes, Start Enforcing Protection". Enter a password and click OK. Save the document.
On Mac: Go to Tools > Protect Document. Check "Protect the document for" and select the type of editing you want to allow from the dropdown. Enter a password and click OK. Save the document.
If you choose "Filling in forms", people can only type in form fields you have created. If you choose "Comments", they can add comments but not change the text itself. If you choose "Tracked changes", all edits will be marked so you can accept or reject them later.
Lock specific sections of a document
You do not have to lock the entire document. You can protect only certain sections while leaving others open for editing. This is useful when you want people to fill in specific blanks or add comments to certain parts.
Divide your document into sections first. Click where you want a section break, go to Layout > Breaks, and select "Continuous". Repeat for each section you want to protect separately. Then go to File > Info > Protect Document > Restrict Editing. In the "Restrict Formatting and Editing" panel, check the sections you want to lock under "Exceptions". Click "Yes, Start Enforcing Protection", enter your password, and save.
People can edit the unprotected sections freely. When they try to edit a protected section, they will see a message asking for the password.
Lock a document in Word Online
Word Online has fewer locking options than the desktop version. You cannot password-protect a document to prevent opening, but you can restrict editing.
Open your document in Word Online. Click File > Info > Protect Document. Select "Restrict Editing". Choose who can edit: "People you specify" or "Anyone with the link". If you choose "People you specify", only the people you invite can open and edit the document. If you choose "Anyone with the link", anyone with the link can view it, but you can set their permission level to "View only" so they cannot make changes.
This method relies on Microsoft account permissions rather than a password, so it works best when you are sharing through OneDrive or SharePoint.
Remove or change a password
If you set a password and want to remove it, open the document (you will need to enter the password first). Go to File > Info > Protect Document. If the document is password-protected to open, click "Encrypt with Password" and delete the password from the box, then click OK. If editing is restricted, click "Restrict Editing", uncheck the protection option, and click "Stop Protection". Save the document.
If you forget the password, Word does not have a built-in recovery option. You will need to contact the person who set the password, or use a third-party password recovery tool (though these are not always reliable and may not work on newer Word versions).
Troubleshooting common locking problems
The document is locked but I cannot remember the password. If you set it yourself, try passwords you commonly use. If someone else set it, contact them. Third-party recovery tools exist but are not may provide to work, especially on newer versions of Word.
I locked the document but people say they can still edit it. Check that you actually clicked "Yes, Start Enforcing Protection" or "OK" after setting the password. If you only set the password but did not confirm, the lock did not activate. Also confirm that the people trying to edit are using the same version of Word — very old versions sometimes do not respect newer restrictions.
I want to unlock just one section for someone else. You cannot give different passwords to different sections. You can only have one master password for the entire document. If you need granular control, consider splitting the document into separate files and locking only the ones that need protection.
The document is locked but I can still print it. Restricting editing does not prevent printing by default. If you want to prevent printing, you will need to password-protect the document entirely (so people cannot open it without the password) rather than just restricting editing.
Frequently Asked Questions
Can I lock a document if I do not have the password?
No. If you do not have the password and the document is already locked, you cannot remove the lock without the password. If you are the owner and forgot it, contact the person who set it or try a third-party recovery tool, though success is not may provide.
Does locking a Word document work in Google Docs?
Google Docs does not use passwords the same way Word does. Instead, you control who can view or edit by sharing settings. Open the document, click Share, and choose whether people can view, comment, or edit. You cannot password-protect a Google Doc.
What happens if someone tries to edit a locked document?
If the document is password-protected to open, they cannot open it at all — they will see a password prompt. If editing is restricted, they can open it but will see a message saying the document is protected when they try to make changes, and they will be asked for the password.
Can I lock a document on my phone or tablet?
Word for iPhone and iPad has limited locking features. You can view and edit locked documents if you have the password, but you cannot set a new lock from the mobile app. Use the desktop version or Word Online to set up protection.
Is password-protecting a Word document secure?
Password protection in Word is reasonably secure for preventing casual access, but it is not military-grade encryption. If someone has significant technical skill and time, they may be able to break older Word passwords. For highly sensitive documents, consider additional security measures like storing the file on an encrypted drive.