How to Unprotect Password-Protected Word, PDF, Excel Documents?

Unlocking data binary

Authors protect documents to ensure that other users cannot edit or copy the information. But what if you are asked to retype the information? What do you do now? Are you going to retype the information which is time-consuming or use a hack so you will be allowed to copy/edit the information? As an employee, I am managing documents and sometimes some documents are protected I do not have the patience to ask and ask for the unprotected copy of the Word/PDF/Excel document rather I apply the hacks below to avoid senseless back and forth communication because for me time is gold when I am working and so I could focus!

Let's get started.

Unprotect password-protected Word Document

1. Open the password-protected Word document you want to unprotect. Save as then select the “Word XML Document” or ".xml" format and close the Word.

Save as Word XML Document

2. Right-click on the saved ".xml" document and open it with text editing programs like WordPad, Notepad, Komodo Edit, Atom, Visual Studio Code, Notepad++, Brackets, Sublime Text, TextMate or other text editors you want to use. For me, I go with Notepad because it is already pre-installed.

Right Click and Open with Notepad

3. Now press CTRL + F to open the Find dialog box and in the search field type the word “enforcement” without the open and close quotation mark. You’ll find any of the strings w:enforcement="1" or w:enforcement="on". Replace the "1" with a zero "0" or replace "on" with "off" to disable enforcement (this will unlock the document). For me, I replaced "1" with a zero "0".

Find Enforcement and Replace 1 with 0

4. CTRL + S to Save the ".xml" document and close your text editor.

5. Now right click on the ".xml" document you just edited and saved, then open it with Microsoft Word.

6. Go to File > Save As, then select Word Document (“.docx” or “.doc” whichever you want) from the Save as type drop-down list. Change the file name of the document by just adding “-unlocked” at the end to emphasize that the document is unlocked.

7. Click Save. Congratulations you are now able to copy/edit the information in the document.

Unprotect password-protected PDF Document

I usually use Unlock PDF an easy-to-use online PDF password remover. I have not yet tried any software so I cannot suggest which best software to use but if you tried this method maybe share the name of the software in the comment below?

How to remove password from PDF files using Unlock PDF:

1. Drag and drop or Choose your document in the PDF Password Remover section.

Drag and Drop or Choose your Document

2. Confirm that you have the right to the file and click ‘Unlock PDF!’.

3. The decryption process should start right away.

4. Modify your PDF further, or click "Download File" to save the unlocked PDF to copy the information.

Unprotect password-protected Excel Document using a VBA Code

1. Open the Excel file that you need to unprotect, then press Alt + F11 to open VBA window.

2. Choose the option that says Insert and click Module.

Insert Module

3. The General window pops up that’s where you enter the below VBA code.

Sub Passwordbreaker()
Dim i As Integer, j As Integer, k As Integer
Dim l As Integer, m As Integer, n As Integer
Dim il As Integer, i2 As Integer, i3 As Integer
Dim i4 As Integer, i5 As Integer, i6 As Integer
On Error Resume Next
For i = 65 To 66: For j = 65 To 66: For k = 65 To 66
For l = 65 To 66: For m = 65 To 66: For il = 65 To 66
For i2 = 65 To 66: For i3 = 65 To 66: For i4 = 65 To 66
For i5 = 65 To 66: For i6 = 65 To 66: For n = 32 To 126
ActiveSheet.Unprotect Chr(i) & Chr(j) & Chr(k) & _
Chr(l) & Chr(m) & Chr(il) & Chr(i2) & Chr(i3) & _
Chr(i4) & Chr(i5) & Chr(i6) & Chr(n)
If ActiveSheet.ProtectContents = False Then
MsgBox "One usable password is " & Chr(i) & Chr(j) & _
Chr(k) & Chr(l) & Chr(m) & Chr(il) & Chr(i2) & _
Chr(i3) & Chr(i4) & Chr(i5) & Chr(i6) & Chr(n)
Exit Sub
End If
Next: Next: Next: Next: Next: Next
Next: Next: Next: Next: Next: Next
End Sub

4. Click on the "Run" button (or press F5 key) to run it. Within a few moments, the code will crack the password of the worksheet and you should be able to see a small message window with the password of the worksheet click ok. Copy first the usable password below in case you will need to enter a password. Close your worksheet and then open it again. You should now able to edit your worksheet even without entering the usable password below.

Click Ok

Unprotect password-protected Excel worksheet/tab. This is different from unprotecting the Excel itself

1. Rename the extension of your spreadsheet from ".xlsx" to ".zip".


From: Password-Protected-WorkSheets-Tabs.xlsx


2. Open the ".zip" file in any File Compression software. There are many free versions available which you can use but for me I use 7-Zip. Do not close yet because you will use in step #6. Right-click on the file > Click 7-Zip > Click Open archive.

Open File with 7-Zip

3. Locate and click the "xl" folder and then click the "worksheets" folder. Inside the "worksheets" folder you will see a list of all your worksheets within your spreadsheet. They are listed as sheet1.xml, sheet2.xml, sheet3.xml depends on how many sheets you have.

Excel XL Folder

Worksheets Folder

Excel Worksheets Folder

XML Documents

Excel XML Documents

4. Create a new folder on your Desktop/Documents Folder then copy and paste all the "worksheets" from the ".zip" file.

5. Now begin looking for that line that begins with <sheetProtection algorithmName="SHA-512". Starting at sheet1.xml > Right-click the file and Open with Notepad press CTRL+F and enter "SHA-512" in the search field and press Enter or click Find Next. If none proceed with sheet2.xml until you find the said line which will look something like this:

<sheetProtection algorithmName="SHA-512"
saltValue="Xvtw5nmaND3LRVYafO1qww==" spinCount="100000" sheet="1" objects="1" scenarios="1"/>

Take note: the hashvalue and saltvalue will be different in your file than what is shown here.

To unprotect just select this entire line – everything between and including the "<" and "/>" characters and delete it.

Excel Worksheet Protection

6. Save your modified XML Document. Repeat the above process for every XML Documents in your spreadsheet. Once complete, you simply need to add your modified XML Documents back into your ".zip" file, overwriting all existing original XML Documents.

To add your modified documents back into your “.zip” file – ensure you have 7-Zip still open and navigate your way through to where the XML files are stored – i.e. go to the xl folder and then the worksheets folder. Then from your desktop or wherever you have the modified XML Documents stored, select ALL your XML files and left click and hold to drag and drop the files from the desktop over into the 7-Zip folder.

7. Rename your ".zip" file back to ".xlsx". Tada all your worksheets that are password-protected will now be unprotected and you can now modify the information (you can copy/delete/change font color etc.)

The aforementioned methods in this post are all effective in unprotecting Word, PDF, and Excel documents. I personally use it when I need them.


  1. Admin. (2019, April 22). Unlock A Password Protected Word Document With or Without Using A Software [Blog post]. Retrieved from
  2. Smallpdf GmbH. (n.d.). Unlock PDF: Free Online PDF Password Remover [Blog post]. Retrieved from
  3. Tiffany, V. (2018, March 9). 3 Ways to Bypass or Crack MS Excel File Password [Blog post]. Retrieved from
  4. ExcelSuperSite. (2018, August 3). How to Remove an Excel Spreadsheet Password in 6 Easy Steps [Blog post]. Retrieved from

Your voice matters. Discussions are moderated for civility before being published on the blog. Read my comment policy here.

Previous Post Next Post