Remove Restricted Editing from a Word Document
You open a Word document, you can read everything, but clicking anywhere produces the notorious "This modification is not allowed because the selection is locked" message. You forgot — or never knew — the password. Good news: Word restricted editing is a soft lock, not file encryption, so you can remove it in a few minutes without the password.
Restricted editing is not file encryption — read this first
Word has two unrelated password features that look similar but are worlds apart. Restricted editing is a display-time enforcement — Word refuses edits inside its own UI but the document text is stored in plain XML anyone can read. A file password to open, on the other hand, encrypts the entire document with AES and cannot be bypassed by editing. If Word asks for a password before showing any content, you have a file password; see our Word password recovery guide instead.
How Restricted Editing Actually Works
A .docx file is a ZIP archive of XML files. Restricted editing adds a single XML element to word/settings.xml that tells Word "enforce read-only (or comments-only, or tracked-changes, or forms-only) mode". The password is hashed and stored in the same element. The document text in word/document.xml is untouched and fully readable.
The element looks like this inside word/settings.xml:
<w:settings ...>
...
<w:documentProtection w:edit="readOnly"
w:enforcement="1"
w:cryptProviderType="rsaAES"
w:cryptAlgorithmClass="hash"
w:cryptAlgorithmType="typeAny"
w:cryptAlgorithmSid="14"
w:cryptSpinCount="100000"
w:hash="..."
w:salt="..." />
...
</w:settings>The XPath expression to target it is /w:settings/w:documentProtection. Remove that single line and Word stops enforcing restriction. Document content is identical, styles are intact, comments remain.
Method 1 — Edit settings.xml (most reliable)
- Make a copy of your document. Never edit the original.
- Rename the copy from
document.docxtodocument.zip. If extensions are hidden, turn on "File name extensions" in Explorer's View tab. - Open the ZIP with 7-Zip, WinRAR, or the built-in Windows archive viewer.
- Navigate to the
word/folder and opensettings.xmlin a text editor (Notepad++, VS Code). Do not fully extract — edit inside the archive. - Find the
<w:documentProtection ... />element. Delete the entire line including the closing slash.
Before:
<w:documentProtection w:edit="readOnly" ... />
After:
(line removed entirely)- Save and let the archiver update the ZIP.
- Rename the file back from
.zipto.docx. - Open in Word. Under Review → Restrict Editing you will see the sidebar empty — protection is gone.
This method works in every Word version from 2007 through Microsoft 365. Works equally well on .docm (macro-enabled) files.
Method 2 — Google Docs round-trip
Google Docs imports the text of a Word document but discards Word-specific editing restrictions. Re-exporting to .docx produces a file with no restriction.
- Go to docs.google.com and create a blank document.
- File → Open → Upload → select your .docx.
- Once imported, you can edit freely. File → Download → Microsoft Word (.docx).
- The downloaded file has no restriction element.
Caveats: tracked changes, some nested numbering, SmartArt, and custom fonts translate imperfectly. For legal or formal documents use Method 1 to preserve every detail.
Method 3 — LibreOffice Save As
LibreOffice Writer opens .docx files but ignores Word's restricted editing flags — it offers to edit them anyway. Saving back as .docx strips the restriction.
- Download LibreOffice (free, libreoffice.org).
- Open your restricted .docx in LibreOffice Writer.
- If prompted about editing mode, click "Edit Document" or similar.
- File → Save As → choose Word 2007-365 (.docx).
- Overwrite or save under a new name. The result has no restriction.
Caveats: LibreOffice's Word compatibility is very good but not perfect. Macros, complex fields, citations, and some advanced layout elements may render slightly differently.
Which Method to Use
| Scenario | Recommended Method |
|---|---|
| Legal document, preserve every detail | Method 1 (XML edit) |
| Comfortable with text editors | Method 1 (XML edit) |
| Never touched XML, want GUI | Method 3 (LibreOffice) |
| No desktop app installed, quick one-off | Method 2 (Google Docs) |
| Document is a Word form with fill-in fields | Method 1 only (forms get re-templated by round-trip methods) |
Special Case: Legacy .doc Files
Pre-2007 .doc files use a completely different binary format (OLE compound document) and are not ZIP-based. Method 1 does not apply as written — there is no XML to edit. The easiest fix for .doc files with restricted editing is:
- Open the file in Word.
- File → Save As → Word Document (.docx).
- Close the file.
- Apply Method 1 (XML edit) on the new .docx.
Word will copy the restriction into the new .docx format, but after the conversion you can remove it via XML. Alternatively, skip the conversion and use Method 3 (LibreOffice) directly on the .doc.
This is NOT the same as a Word file password
If Word refuses to open your file at all and demands a password upfront, that is file-level AES encryption and none of the three methods above will work. For that scenario, see our Word password recovery guide. For .doc files from Word 97-2003, file-open password recovery is guaranteed thanks to the old 40-bit RC4 weakness.
Frequently Asked Questions
Word says 'Stop Protection' is greyed out. What now?
That button is only active once you enter the correct password. Since you do not have it, bypass the UI completely — use Method 1, 2, or 3 above to remove protection from outside Word.
Will deleting the XML element also remove tracked changes or comments?
No. Tracked changes, comments, and revision history live in separate XML parts (document.xml, comments.xml). Removing w:documentProtection only lifts the editing lock.
The document is a form with fillable fields — will the XML method break form behaviour?
No. The documentProtection element can independently be w:edit='forms'. Removing the element removes forms-only mode too, but the fields themselves (content controls, legacy form fields) remain functional.
My document was protected via Information Rights Management (IRM), not password. Does this method work?
No. IRM uses real encryption tied to Azure AD or Active Directory Rights Management. That is a completely different system — you need to be authenticated as the intended recipient.
Can someone tell I removed the restriction?
Only if they compare the original file byte by byte. Word does not show an audit trail. However, digital signatures on the document are invalidated by any modification, including XML edits.
File-open password? Different problem, different solution
This page covers restricted editing. If your Word document is fully encrypted and will not even open without a password, upload it for a free recovery check — you pay only if the password is actually recovered.