File Formats
What Is DOCX? Inside the Word File Format
DOCX, Word's default format since Word 2007, is a ZIP package of XML files. We explain its structure, the standards behind it and what survives a conversion.
Author: Hemen Dönüştür Editör EkibiPublished: 7 min read

Press "Save" in Word and the file you get almost certainly ends in .docx. It has been Microsoft Word's default for close to twenty years and is one of the most common editable document formats in business, education and government. Yet few people realize that a DOCX file is really a ZIP archive full of XML files. This article covers how DOCX came about, which standards it is built on, what is inside it, and what to keep in mind when converting DOCX to other formats.
What is DOCX?
DOCX is the file extension for documents written in WordprocessingML, the word processing part of the Office Open XML (OOXML) standard. The older .doc format was a closed binary format that wrote Word's in-memory structures more or less directly to disk. DOCX instead stores text, formatting, images and settings as separate XML parts and bundles them into a single compressed package. As a result, files are usually smaller, more resilient to damage, and readable and writable by software other than Word.
A short history
Microsoft moved to XML-based Office formats in stages. The first XML format for Excel arrived in 2000 and one for Word in 2002, and both shipped with Office 2003. In November 2005 Microsoft announced it would standardize these formats through Ecma International under the name "Office Open XML". Things then moved quickly:
- December 2006: Ecma approved the first edition as ECMA-376.
- 2007: Office 2007 made DOCX Word's default save format. For older Word versions, Microsoft released a Compatibility Pack that could open and save DOCX.
- April 2008: the fast-tracked ISO/IEC process, which had failed its first ballot, ended in approval.
- November 2008: the standard was published as ISO/IEC 29500:2008, and Ecma released a technically equivalent second edition in December 2008.
- 2011, 2012 and 2021: the third, fourth and fifth editions of ECMA-376 followed. The parts of the current fifth edition were updated between 2015 and 2021.
Standardization introduced two conformance levels: Transitional and Strict. Transitional includes compatibility features carried over from the old binary documents, and it is what Word writes by default. Office 2010 could only read Strict documents; Office 2013 and later fully support Strict, but Microsoft did not make it the default for backward-compatibility reasons.
What is inside a DOCX file?
Rename a DOCX file to .zip and open it, and you will typically see a structure like this:
[Content_Types].xml content types of the parts in the package
_rels/.rels top-level package relationships
docProps/core.xml metadata such as title, author and dates
word/document.xml the main document text
word/styles.xml style definitions
word/numbering.xml list numbering
word/header1.xml header (if any)
word/footer1.xml footer (if any)
word/media/image1.png embedded images
word/_rels/document.xml.rels image and hyperlink relationships
The packaging rules are defined in Part 2 of ECMA-376, the Open Packaging Conventions (OPC). Every part has a content type, and parts are linked through relationship files. An image in the text, for example, is referenced not by its file name but by an ID in the relationships file, such as rId5.
The actual content lives in word/document.xml. According to Microsoft's Open XML documentation, the simplest valid document needs a document root, a body, at least one paragraph (p) containing a run (r), and text (t) inside that run:
<w:document xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main">
<w:body>
<w:p>
<w:r>
<w:rPr><w:b/></w:rPr>
<w:t>Hello world</w:t>
</w:r>
</w:p>
</w:body>
</w:document>
A run is a stretch of text that shares the same formatting. A single bold word in the middle of a sentence splits the paragraph into three runs. That is also why Word documents often scatter the same text across many runs for no visible reason, something every converter has to cope with.
DOCX, DOCM and DOTX
The same family has a few more extensions. .docm is a macro-enabled document; a plain .docx cannot carry macros, which makes it the safer choice for email attachments. .dotx is a template and .dotm a macro-enabled template. Structurally they are all the same OPC package; they differ in the parts they contain and their declared content types.
Where is DOCX used?
- Business correspondence: proposals, reports, memos and contract drafts.
- Education: assignments, theses, thesis templates and course materials.
- Legal and public sector: petitions and letter drafts; in Turkey a document destined for UYAP can be prepared in Word and then converted to UDF.
- Publishing: editing rounds between author and editor using tracked changes and comments.
- Automated document generation: because the format is an open standard, software can produce invoices, certificates and reports as DOCX.
Strengths and weaknesses
| Strengths | Weaknesses |
|---|---|
| Open, documented standard (ECMA-376, ISO/IEC 29500) | The standard is huge; few programs support all of it |
| Small files thanks to ZIP compression | Layout can shift between different programs |
| Tracked changes, comments, styles, tables of contents | Fonts are not embedded, so appearance depends on the device |
| Macro-free, safer default format | The Transitional vs Strict split can cause compatibility issues |
| Supported by nearly every office suite | Not as suitable as PDF for "locking" a final version |
Which programs open DOCX?
Word 2007 and later, plus Word for the web and mobile, open DOCX natively. LibreOffice Writer, Google Docs, Apple Pages and WPS Office can also read and write it. Word 2003 and earlier need Microsoft's Compatibility Pack. All of these handle basic text, styles and tables well, but advanced layout, text boxes, SmartArt and some field codes may look different from one program to the next.
Common problems and how to fix them
"The file is corrupt and cannot be opened"
Because DOCX is a ZIP package, a partially downloaded file or a badly saved email attachment will not open. Try downloading it again first. In Word, the "Open and Repair" option in the Open dialog often recovers the text. Renaming a copy to .zip and trying to open it also tells you whether the file is a valid package at all.
The layout shifts on another computer
DOCX does not embed fonts by default. If the recipient lacks the font, a substitute is used, lines rewrap and page breaks move. If the layout must be exact, share a PDF or enable font embedding in Word's options.
The "Compatibility Mode" banner
Opening an old .doc file in a recent Word shows "Compatibility Mode" in the title bar. Saving the file again as DOCX turns that mode off and unlocks newer features.
Tracked changes are still visible
Unaccepted changes and comments stay in the shared file. Accept or reject all changes and delete comments before sending.
Tips for converting DOCX files
On our converter, Word documents are uploaded to our server and deleted within 30 minutes. Conversions between DOCX, DOC, RTF and PDF are done directly with LibreOffice, without an intermediate HTML step. That is why Word to PDF keeps page layout, headers and footers, table borders, list numbering and images. A custom font that is not installed on the server may be replaced with a similar one.
- For legacy systems: Word to DOC helps with software that only accepts the Word 97-2003 format. Newer features with no DOC equivalent, such as some graphics and layout elements, may be simplified.
- For UYAP: with Word to UDF the document is first normalized with LibreOffice, then paragraphs, character formatting, alignment, lists, tables, embedded images and page margins are mapped to the UDF structure. Thanks to that normalization step, Strict DOCX files and files produced by other programs can be read too.
- For the web and documentation: Word to Markdown keeps headings, bold and italic text, lists, tables and links; fonts, colors and page layout are dropped because Markdown has no equivalent for them.
- Going the other way: PDF to Word is always a reconstruction, so keep the original DOCX whenever you can.
Frequently Asked Questions
What is the difference between DOCX and DOC?
DOC is the binary format used by Word 97-2003. DOCX is the ZIP-based open standard made of XML parts, introduced with Word 2007. DOCX is usually smaller, more robust and safer because it cannot carry macros.
Is DOCX an open standard?
Yes. It is standardized by Ecma as ECMA-376 and by ISO/IEC as ISO/IEC 29500. The ECMA-376 texts can be downloaded free of charge from Ecma's website.
How can I look inside a DOCX file?
Make a copy, change its extension to .zip and open it. You will find the text in word/document.xml and the images in the word/media folder.
Can a DOCX file contain a virus?
A plain DOCX cannot contain macros; macro-enabled documents use the .docm extension. As with any file type, be careful with documents from unknown sources and keep your office software up to date.
Can I open DOCX without Word?
Yes. LibreOffice Writer, Google Docs, Apple Pages and WPS Office all open DOCX. If you only need to read it, converting it to PDF is also a practical option.


