The fastest way to lock a Word document
To lock a document in Microsoft Word so others cannot edit it, go to File > Info > Protect Document and choose Encrypt with Password. Type a password, confirm it, and save the file. Anyone who opens the document will need that password to make changes — they can still read it without the password, but cannot edit it.
If you want to let people view and edit the document but prevent them from changing the formatting or structure, use Restrict Editing instead. This option sits in the same Protect Document menu and lets you lock specific parts while leaving others editable.
The method you choose depends on whether you want to block editing entirely or just prevent accidental changes to layout and design. Password protection is stronger and works across all versions of Word. Restrict Editing is lighter and better for shared documents where you want to control what people can change.
Key Takeaways
- Password-protecting a document in Word prevents anyone from editing it without entering your password, though they can still read it.
- Go to File > Info > Protect Document > Encrypt with Password, type your password twice, and save the file.
- Restrict Editing lets you lock formatting and structure while keeping specific sections open for editing, useful for forms and templates.
- Once you lock a document, you cannot unlock it without the password, so write it down somewhere safe.
Password protection versus restrict editing
Password protection (Encrypt with Password) locks the entire document. The file itself becomes encrypted, and Word will not let anyone open it for editing without the correct password. They can view the document in read-only mode if they choose, but they cannot make any changes. This method is stronger and works the same way whether someone opens the file in Word on Windows, Mac, or online.
Restrict Editing keeps the document open and editable but controls what parts people can change. You can lock the whole document except for specific sections, or lock everything except comments. This is useful for forms where you want people to fill in blanks but not change the questions, or for templates where you want to protect the design but let people edit the content. Restrict Editing does not require a password — it just prevents changes to the parts you lock.
Choose password protection if you want to prevent all editing. Choose Restrict Editing if you want to let people work with the document but keep them from breaking the layout or changing things they should not touch.
Step-by-step: Password-protect your document
Open the document you want to lock. Click File in the top left corner, then click Info from the menu on the left side. You will see a button labeled Protect Document with a dropdown arrow next to it. Click that dropdown and select Encrypt with Password.
A dialog box will appear asking you to enter a password. Type a password you will remember — Word does not show you what you typed, so be careful. Click OK. Word will ask you to type the password again to confirm it. Type it exactly the same way and click OK. Now save the file using Ctrl+S (Windows) or Command+S (Mac). The password protection takes effect when you save.
The next time anyone opens this file, Word will ask for the password before letting them edit. If they click Read Only instead of entering the password, they can view the document but cannot make changes.
Step-by-step: Restrict editing on specific sections
Open your document and select the text or section you want to keep editable. If you want multiple separate sections to be editable, select the first one, then hold Ctrl (Windows) or Command (Mac) and click to select the others. Go to File > Info > Protect Document and click Restrict Editing.
A panel will open on the right side of your screen. Under "Formatting restrictions," you can choose to prevent changes to formatting. Under "Editing restrictions," select Locked to lock the entire document, then check the box next to Exceptions — Select parts of the document and let these users edit them without a password. The sections you selected before opening this panel will now be marked as editable. Everyone else will be locked.
Click Yes, Start Enforcing Protection at the bottom of the panel. Word will ask if you want to set a password. You can leave this blank if you trust the people using the document, or type a password if you want to prevent them from removing the restrictions. Click OK and save the file.
What happens when someone tries to edit a locked document
If a document is password-protected with Encrypt with Password, Word will show a dialog asking for the password the moment someone tries to open it. They can click Read Only to view the document without editing, or enter the password to unlock it for editing. If they enter the wrong password, Word will not let them proceed.
If a document has Restrict Editing turned on, the locked sections will appear grayed out or with a different background color. When someone tries to click in a locked section, Word will show a message saying that section is protected. They can still edit any sections you marked as exceptions. If you set a password on the restrictions, they cannot remove the locks without entering it.
Removing a password or unlocking a document
To remove password protection, open the document (you will need to enter the password), go to File > Info > Protect Document > Encrypt with Password, and delete the password from the dialog box. Leave it blank and click OK. Save the file. The password protection is now gone.
To turn off Restrict Editing, go to File > Info > Protect Document > Restrict Editing. The panel on the right will show a button that says Stop Protection. Click it. If you set a password on the restrictions, Word will ask for it. Enter the password and click OK. The document is now fully editable again.
If you forget the password to a password-protected document, there is no way to recover it or unlock the file. Word does not store passwords and cannot retrieve them. This is why it is important to write down your password somewhere safe if you think you might forget it.
Locking documents in Word Online versus Word Desktop
Word Online (the browser version at Office.com) does not have a built-in way to password-protect documents or use Restrict Editing. If you need to lock a document, you must use the desktop version of Word on Windows or Mac. Once you lock a document in the desktop version, Word Online will respect that lock — people will need the password to edit it in the browser.
If you are sharing a document through OneDrive or SharePoint, you can also control who can view and edit it using the sharing settings. This is different from locking the document itself, but it is another layer of protection. You can set a document to "View only" so people cannot make changes, or limit sharing to specific people.
Frequently Asked Questions
Can I lock just one page of a Word document?
Not directly — Word locks by section, not by page. You can insert a section break before and after the page you want to lock, then use Restrict Editing to lock that section while leaving the others editable. This requires a bit of setup, but it works.
What if I password-protect a document and then forget the password?
You cannot open the document for editing without the password. Word does not have a password recovery option. If you forget it, the document is locked permanently. Write down your password and store it somewhere safe, or use a password manager to keep track of it.
Can someone remove the password protection if they have the file?
No. Password protection is built into the file itself. They cannot remove it without the password, and there is no way to crack or bypass it. This is why password protection is stronger than Restrict Editing.
Does locking a document prevent people from copying text out of it?
No. Password protection prevents editing, but people can still copy and paste text from a locked document. If you need to prevent copying, you would need to use a different tool or service outside of Word.
Can I lock a document but still let people add comments?
Yes. Use Restrict Editing and select Locked, then check the box for Comments under the exceptions. This lets people add comments without editing the actual text.