What is the DOCX file format?
Files with the .docx extension contain formatted text documents, possibly with graphic elements, stored in a format native to Microsoft Word and introduced with Word 2007. .docx files are part of the Office Open XML (OOXML) specification, standardized as ISO/IEC 29500. Each .docx file is compressed using the ZIP archive method and built on XML, using the markup languages WordprocessingML and DrawingML, developed by Microsoft.
.docx is the successor of the proprietary binary format .doc. It offers better portability across programs and platforms thanks to its open specification. .docx does not support macros - to enable macro use, a file must be saved in the .docm format instead. Most office suite applications support .docx, and files can be converted to other formats such as .odt.
.docx files are so widely used that virtually every advanced word processor supports them. Beyond dedicated desktop software, .docx files can be opened and edited for free in online editors such as Google Docs and Word for the web. These web editors closely resemble their desktop counterparts, making them accessible to most users without any additional software.
Security & safety
RISK: LOWPlain DOCX cannot run macros, which makes it safer than the older .doc or the macro-enabled .docm: a normal .docx is essentially a container of text and images. The residual risks are (1) macro-enabled documents disguised by extension - a real .docm or a renamed file can carry VBA macro malware, so never click 'Enable Content' on a document you didn't expect; and (2) embedded links/objects and template injection. Modern Office opens documents from e-mail/the internet in Protected View. Opening an unknown DOCX in Google Docs or LibreOffice is generally safe because the text renders without executing Word VBA.
Format details
in a nutshellPrograms that open DOCX files
Technical details
deep spec| Container format | ZIP-based OPC (Open Packaging Conventions) archive - compatible with any standard ZIP tool |
| Primary markup language | WordprocessingML XML (namespace prefix w:), defined in ISO/IEC 29500 Part 1 |
| Graphics markup language | DrawingML, shared across Office Open XML formats (.docx, .xlsx, .pptx) |
| MIME type | application/vnd.openxmlformats-officedocument.wordprocessingml.document |
| Magic bytes | 50 4B 03 04 ("PK") at offset 0 - standard ZIP local-file header; distinguished from plain ZIP by internal structure |
| Main document part | word/document.xml - contains the entire document body (paragraphs, tables, runs) |
| Package manifest | [Content_Types].xml at archive root - declares MIME types for every part in the package |
| Macro support | None; macros are prohibited - macro-enabled documents use the .docm extension instead |
| Style definitions | Paragraph and character styles stored in word/styles.xml, applied via w:pStyle and w:rStyle attributes |
| Image storage | Binary media files kept under word/media/, referenced via OPC relationship files in word/_rels/ |
| Tracked changes | Stored inline as <w:ins> (insertion) and <w:del> (deletion) XML elements within the document part |
| Theme storage | Color palette, font scheme, and visual effects defined in word/theme/theme1.xml |
| Footnotes and endnotes | Stored as separate package parts: word/footnotes.xml and word/endnotes.xml, linked via relationships |
| Headers and footers | Each section's header/footer stored in independent parts (word/header1.xml, word/footer1.xml) |
| Character encoding | UTF-8 for all XML parts within the package |
| Released | 2007 (Word 2007 / Office Open XML); ISO/IEC 29500 in 2008 |
| Open standard | Yes · royalty-free |
| Specification | learn.microsoft.com |