How can I unlock a Microsoft .docx document?

I have a Microsoft .docx document that is locked down and can't even be viewed without the forgotten password. I'm wondering if there is an easy way to unlock it or get the computer to remember the password itself with a hint or something.

asked Oct 12, 2012 at 13:21 951 4 4 gold badges 10 10 silver badges 15 15 bronze badges

5 Answers 5

DocX is a compressed zip container file. Make a copy of the original docx file. If you unzip it, there is a subfolder named word with a file named settings.xml . You can open settings.xml with a plain text editor.

Within that there is a block of text:

You can either change w:enforcement value to 0 or remove the block entirely.

Then you zip up the whole thing again (don't zip up the whole folder: the content_types.xml and subfolders must be root of the zip file.), rename the result to have a Docx extension, and then open it in word.

answered Oct 12, 2012 at 14:49 3,689 18 18 silver badges 15 15 bronze badges

In Word 2010, this works only if the document is not read-protected, so it won't work for the OP. If the 2010 document is read-protected, it does not appear as a valid ZIP file. Also, the 2010 tag name is writeProtection rather than documentProtection and there is no w:enforcement.

Commented Jan 9, 2015 at 21:01 It's honestly sad it's that easy to "unencrypt" a shipping product. Commented Jun 25, 2015 at 23:41 I honestly can't believe a security company just sent me a doc with this type of protection Commented Dec 21, 2016 at 11:29

To clarify, this method is for making a document editable again. It will not allow you to view a password‑encrypted document.

Commented May 3, 2018 at 4:48
  1. Open your document in Word, then save it in ".xml" format.
  2. Open the .xml doc in wordpad, emacs, or your favorite text editor.
  3. Search for the string w:enforcement="1".
  4. Replace the "1" with a "0" to disable enforcement (i.e., unlock the document).
  5. Save the document from your text editor.
  6. Open the .xml document in Word.
  7. Choose "Save as. " and save it as a .doc or .docx file.

Mac users: ExtendScript Toolkit works well as a text editor in this workaround.

answered Oct 12, 2012 at 14:21 584 3 3 silver badges 14 14 bronze badges

"Open your document in Word, then save it in ".xml" format." cant open document. we are precisely looking for the pass for do that.

Commented Aug 16, 2017 at 11:05 This technique is for removing the readonly flag, not the document password.. Commented Aug 16, 2017 at 11:12 This also appears to work for removing the ability to disable tack changes Commented Nov 27, 2017 at 12:22

MS Word has used 128-bit AES encryption since Office 2007 so no, there's no easy way to unlock it.

If you think your password is simple enough or vulnerable to a dictionary attack, you could try one of the various password cracking apps available (caveat downloader).

It's trivial to remove the Edit protection from Word documents by editing settings.xml within the compressed .docx file as discussed in other answers here. However, as you have applied Encrypt with Password to require a password to open the document, that method won't be available.