Word: Unlock a password-protected document

April 18, 2017

I spotted this 2009 article (http://people.csail.mit.edu/teller/misc/unlockworddoc.html) a few weeks ago, and have now had time to test it — it works!

Now, why would you want to unlock a password-protected Word document? Surely the author/company has locked it for a reason? Yes, in many cases, that’s correct and you shouldn’t try to circumvent the password protection — instead, ask the author/company for the password if you need to access elements of the document (e.g. protected form fields, formatting tools etc.).

However, if the author has left the company, or if they wrote the document many years ago and have forgotten the password (it happens!), then you may need to break the password protection to access the document’s contents and functions.

You can follow the steps in the link above, or, in case the content at that link gets removed at any stage, follow my modified and more detailed steps below, which are based on that article:

  1. Open the password-protected document in Word, if you can. NOTE: Many password-protected documents can be opened but you can’t do anything with them, like change any wording that isn’t inside a form field, modify styles, apply different formatting etc. For those documents, the password protection applies to elements of the document, not the whole document, and you can open it but not do much with it. If the entire document has been protected, then you may not be able to open it, and thus can’t do any of the steps below.
  2. Go to File > Save As, then select Word XML Document (*.xml) from the Save as type drop-down list.
    Select Word XML Document from the Save as Type drop-down list
  3. Click Save.
  4. Close Word.
  5. Right-click on the saved XML file (it should be in the same folder as your original document), then select Open with and choose a text editing program to open the file with (e.g. WordPad, NotePad, or other text editing program — do NOT choose Microsoft Word).
  6. Press Ctrl+F to open the Find dialog box.
  7. In the Find what field, type enforcement.
  8. You’ll find one instance, either w:enforcement=”1″ or w:enforcement=”on”.
    Find 'enforcement'
  9. Replace the “1” with a zero “0” (or replace “on” with “off”) to disable enforcement. This step unlocks the document.
  10. Save the XML document within your text editor, then close the text editing software.
  11. Right-click on the saved XML file, then select Open with and choose Microsoft Word.
  12. As soon as you’ve opened it, go to File > Save As, then select Word Document (*.docx) from the Save as type drop-down list. Change the file name if you want to preserve the original password-protected document and make this a new document, or use the same file name to replace the original document.
  13. Click Save. You should now be able to edit the document.

[Link last checked August 2022]


  1. […] Update for Microsoft Word (posted 2017): https://cybertext.wordpress.com/2017/04/18/word-unlock-a-password-protected-document/ […]

  2. Thanks so much for your help.

  3. Awesome tip! Helped me a lot.


  5. Thanks so much for your help.

  6. I have read dozens of explanations – but noone is addressing my issue. I have files that are shown as locked in my finder. I cannot open them in word. I have tried to go in and change the permissions and the only users showing are MacPorts and guestUsers. MacPorts has permission to read and write. I cannot add my name to the list – again, because I do not have permission. Any suggestions?

  7. Sorry, I never use Macs, so have no idea how to fix this issue, assuming it can be fixed. Permissions can be applied to docs in several ways, including at the file system level, and it sounds like this is what you’re encountering. The explanation above deals with permissions set at the document level.


  8. Excellent!!!

  9. Excellent – worked for me. Thank you

  10. Followed directions, answered ‘Cannot find enforcement’

  11. Hi Peter

    It’s possible the document was protected in another way — see earlier comments.


  12. You are a legend!!!! Thank you so much for this

  13. Didn’t work for me since the document has drop down text to choose from.


  14. This is one of the most useful things that I have learnt this year. Thank you!

  15. Is there any way to open author protected .rar file ?

  16. Fantastic tool. Works well for documents I need to update but don’t have the password the former employee forgot to leave. I love this.


  18. The word enforcement doesnt appear… What to do then!?? Any other alternative

  19. Hi Dixit

    There are different types of password protection — on styles, on track changes, on the file itself. This blog post only deals with one type, so you document may use another.


  20. please can some one there help me to remove password from my word document

  21. Thank you!!!!!!

  22. I follow this process but in xmL document I can not search enforcement word in document.
    please suggent another process.

  23. You are brilliant!

  24. Thank you!!!

  25. The following sentence is apparently no longer operative, because a friend just used the procedure to unlock a document that was protected completely: “If the entire document has been protected, then you can’t open it, and thus can’t do any of the steps below.”

  26. Thanks Bonnie. Good to know. Because that may still be the case for some versions of Word, I’ve changed the sentence to read ‘may not be able to open it’.


  27. Another thank you! I had a real estate sales agreement for that was in (.doc) format and had end-user fillable fields, all of the existing text on the form was protected. I needed to change the wording of the protected text and the your method for removing the protection worked exactly as described.

  28. Can’t belive it work, but it did! Thank you!

  29. “Open the password-protected document in Word, if you can”. No one can, because it’s password-protected.

  30. Actually DoSomeRealResearch, many so-called password-protected documents CAN be opened, but you can’t make any modifications to them. Some, of course, cannot be opened at all. I mention that in Step 1 of my post: “If the entire document has been protected, then you may not be able to open it, and thus can’t do any of the steps below.”

    The information in the post is for those who can open the document, but not modify it without a password.


  31. This was very useful! Thanks very much

  32. Thank you so much. I wasn’t able to achieve this using Notepad. An error kept coming up “this process is already in use” when I tried to save it, and I was only able to save it as a .txt file, not within XML. But in Wordpad it worked perfectly!!

  33. Freakin’ brilliant. Saved me a bunch of copying and pasting. Thanks!

  34. My god, this saved my day! Very useful article!

  35. Brilliant!

  36. Good work

  37. you are a genius! Thank you

  38. It’s already 2022 but this trick still works.
    You are doing god’s work.

  39. My files are protected but I don’t know the password

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: