Microsoft Word saves .docx documents as ZIP archives containing XML and media files, so opening a copy as an archive can sometimes recover text when Word refuses to open the file.
Since Office 2007, Microsoft Word has used the Office Open XML format for .docx files. Each document is a collection of XML files and media bundled into a ZIP archive with a different extension.
To inspect the contents, users can make a copy of the document, rename the copy from .docx to .zip, and open it with an archive tool. The word/document.xml file contains the document text, while styles.xml stores formatting and the media folder contains images.
A file that Word cannot open may contain a small XML error, such as a missing closing tag after an interrupted save. Word’s Details option can identify a part, line and column, and the XML can then be inspected in a browser or edited in an IDE.
If a file was truncated and its ZIP central directory is missing, tools such as 7-Zip may still extract intact components. Word also includes Open and Repair and Recover Text from Any File, while OneDrive version history may provide an earlier copy. Work on a duplicate so the original is not changed.