.fw files.wiki
DOCX

DOCX Files

Microsoft Word Open XML Document

A .DOCX file is a Microsoft Word document stored as an Office Open XML ZIP package, usually containing text, formatting, images, and metadata.

Office Open XML WordprocessingML Document (DOCX, Transitional)

Most common
Developer
Microsoft; Ecma International; ISO/IEC JTC 1
Category
Documents
MIME type
application/vnd.openxmlformats-officedocument.wordprocessingml.document
Format
Container
Magic bytes
50 4B 03 04
First released
2006
Latest version
ECMA-376 5th edition / ISO/IEC 29500:2016 family
Open standard
Yes

Encrypted Office Open XML WordprocessingML Document

Developer
Microsoft
MIME type
application/vnd.openxmlformats-officedocument.wordprocessingml.document
Format
Container
Magic bytes
D0 CF 11 E0 A1 B1 1A E1
First released
2007
Latest version
Agile Encryption as documented in MS-OFFCRYPTO
Open standard
No

Office Open XML WordprocessingML Document (DOCX, Strict)

Developer
ISO/IEC; Microsoft; Ecma International
MIME type
application/vnd.openxmlformats-officedocument.wordprocessingml.document
Format
Container
Magic bytes
50 4B 03 04
First released
2008
Latest version
ISO/IEC 29500 Strict / ECMA-376 5th edition
Open standard
Yes

Open a .DOCX file online

Reading file…

What is a .DOCX file?

In general, a .DOCX file is a macro-less Microsoft Word document that first appeared in Office 2007 and that is based on Office Open XML WordprocessingML. Its specification was created by Microsoft Corporation and became a standardized specification by the Ecma International (ECMA-376) and ISO/IEC (ISO/IEC 29500). Typical contents of a .DOCX file include document text, paragraphs, character formatting, page layout information, tables, images, charts, footnotes, comments, tracked changes, and document properties.

Typical .DOCX files usually have their origin in Microsoft Word, Word for the web, Google Docs export, LibreOffice Writer application, business templates, school assignments, resumes and email attachments. Typically, a .DOCX document is a ZIP based Office Open XML package that can be unzipped using a renamed document (renamed .DOCX -> .ZIP), having folders named "word", "_rels" and "docProps". Typical starting bytes (offset is 0): 50 4B 03 04.

Two different kinds of .DOCX documents exist that have the very same file extension. A password protected .DOCX document may start as an OLE Compound File container in the start of document because Microsoft Office stores the encrypted OOXML package in so-called "Office Encryption wrapper"; therefore, its first starting bytes are D0 CF 11 E0 A1 B1 1A E1. There exists rarely used .DOCX variant which is Strict .DOCX and where the Transitional compatibility markup namespaces are replaced by ISO Strict namespaces.

How to open a .DOCX file

Open a .DOCX file on Windows

  1. 1 Go to the folder with your file in File Explorer. Usually, downloaded files end up in Downloads.
  2. 2 Double-click your .DOCX file if you have an app for .docx files on your computer. In case it does not open, move on to step three.
  3. 3 Right-click your .DOCX file -> select Open with -> Choose another app.
  4. 4 Choose Microsoft Word in the list (Windows 11: choose Always). For Windows 10 -> put a check on "Always use this app to open .docx files" and click OK.

Still not opening? See common problems and fixes, or view it in your browser.

Programs for Windows

Open a .DOCX file on macOS

  1. 1 In the Finder app, locate your .DOCX file.
  2. 2 Just double-click your .DOCX file in order to automatically launch the program which is connected with it.
  3. 3 Need another app on your Mac? Control-click the file (or right-click with a mouse). In the pop-up menu select Open With -> Microsoft Word.
  4. 4 If it isn't in the list, choose Other… and find the application manually.

Still not opening? See common problems and fixes, or view it in your browser.

Programs for macOS

Open a .DOCX file on Linux

  1. 1 Launch your file manager. Depending on the desktop it may be named Files (GNOME), Dolphin (KDE Plasma), Nemo (Cinnamon) or Thunar (Xfce).
  2. 2 Double-click the file.
  3. 3 Or choose another program by right-clicking the file -> Open With -> LibreOffice Writer.
  4. 4 Install LibreOffice Writer (if it is not installed on your computer) from the software centre, repository or Flathub.

Still not opening? See common problems and fixes, or view it in your browser.

Programs for Linux

Open a .DOCX file on Android

  1. 1 Launch Files or another file management app.
  2. 2 In Downloads, find the .DOCX file and open it by tapping.
  3. 3 A list of apps capable of opening the file will be shown. Tap Microsoft Word and press Always to permanently connect the file type with this app.
  4. 4 No apps able to open this file? Download Microsoft Word from the Google Play Store.

Still not opening? See common problems and fixes, or view it in your browser.

Programs for Android

Open a .DOCX file on iPhone / iPad

  1. 1 Use the Files app and go to On My iPhone, iCloud Drive or Downloads.
  2. 2 Tap the .DOCX file you want to open.
  3. 3 If the file can be opened by a built-in iOS app (supported format), it opens automatically.
  4. 4 Touch and hold the file to get the context menu -> choose Share -> select Microsoft Word from the list of apps.
  5. 5 If there is no such option, download the app first from the App Store and then tap the document again.

Still not opening? See common problems and fixes, or view it in your browser.

Programs for iPhone / iPad

Open a .DOCX file online

  1. 1 Move to the online viewer at the top of this page.
  2. 2 Drag the file there or select it, and its contents will appear in your browser tab. The file is not uploaded.

Still not opening? See common problems and fixes, or view it in your browser.

Programs for Online

More details about opening .DOCX files

For opening a .DOCX file on Windows operating systems with maximum fidelity including comments, tracked changes, and password protected document, it will be better to use MS Word because of its higher support for all of these features. Other programs such as LibreOffice Writer, ONLYOFFICE Desktop Editors, WPS Writer, Collabora Office, and Apache OpenOffice Writer are capable of opening the file if there are no specific requirements related to layout and editing features.

For users of macOS, both Microsoft Word and Apple Pages (Apple's free word processor) open .DOCX files. Some alternative software like WPS Writer, LibreOffice Writer or ONLYOFFICE Desktop Editors also allow opening files on macOS operating system.

If you work under the operating system Linux the most widely spread applications include LibreOffice Writer and ONLYOFFICE Desktop Editors since the first one usually works well for all kinds of documents whereas the latter is known for its great fidelity. You can also work with WPS Writer, Collabora Office, Apache OpenOffice Writer, and SoftMaker TextMaker on Linux operating systems.

If you use either iOS or Android as an operating system there are several applications such as MS Word application, WPS Office, Google Docs, or Zoho Writer and on iOS devices you can also use Apple Pages. On websites such as Word for the web, Google Docs, or Collabora Online .DOCX file could be easily opened directly from the cloud without downloading any office suite.

Free viewers may work well enough if your aim is to see the file but if it comes to high level editing you would better use Microsoft Word or a full office suite. If opening with double-click does not work then choose 'Open With' and find Word, LibreOffice, or another software, or just reset the .docx file association in system preferences.

Technical details

In .docx package, XML parts are commonly encoded in UTF-8, though some parts (images and other resources) are packed in the same container as non-text data and compressed in ZIP Deflate compression (as well as ZIP supports storing uncompressed entry). For .docx, there exists special registered MIME type: it is "application/vnd.openxmlformats-officedocument.wordprocessingml.document".

Package includes [Content_Types].xml file mapping part names and extensions to content types, "_rels/.rels" indicating primary document within the package and providing package-level meta-data. Typical parts inside the package include "docProps/core.xml", "docProps/app.xml", "word/document.xml", "word/styles.xml" and "word/settings.xml". Images and other binary resources commonly appear under "word/media/" subtree. Parts for Themes, numbering, headers, footers, footnotes, endnotes, comments, charts and embedded objects are also added into "word/" directory tree.

Text contents are contained as WordprocessingML in "word/document.xml". Texts are written in Unicode characters set. XML parts may use another XML-supported encoding, specified by "XML" declaration on the top of file. Relationships between the document parts are included into separate "Relationship part", which contains relationship ID and has ".rels" suffixes as filename. Relationships include links from the document markup to styles, themes, numberings, headers and footers, footnotes, embedded objects and chart references.

"docProps/core.xml" contains Dublin Core-style properties ("dc"), which contain typical Dublin-core properties (title, subject, etc.) including creation, modifications dates and revisions' numbers. Word oriented information (page numbers, word and characters counter, application, template names and some more) is stored into "docProps/app.xml". It is worth mentioning, the format appears in two versions - Transitional and Strict - and ECMA-376 came first in 2006, while ISO/IEC 29500 appeared in 2008. Current generation of this specification is described by ECMA-376 (fifth) edition and ISO/IEC 29500:2016 (and both are equivalent). There is no VBA macro code allowed within .docx packages. Document with VBA and other features is called macro-enabled .docm files and template without macros is stored as .dotx documents. Encrypted document (.docx) contains different packaging: its outer packing is a Compound File Binary Format starting with signature D0 CF 11 E0 A1 B1 1A E1 and streams EncryptionInfo and EncryptedPackage.

How to convert .DOCX files

Despite changes and advances in document technology, PDF is the de facto standard if it is desired that a given .DOCX will look the same way for all recipients or for printing. In Microsoft Word, generate the desired format using File | Save As or File | Export. When converting multiple files in a batch, one can make LibreOffice run in headless mode: libreoffice --headless --convert-to pdf --outdir out input.docx. Pre-install required fonts and check pagination, line breaks, equations, pictures, charts, complex tables since Word and LibreOffice layout engines are different.

For OpenDocument based suites like LibreOffice use ODT format as the target one: libreoffice --headless --convert-to odt --outdir out input.docx. Notice the differences of Word layout capabilities, content controls, and how tracked changes are managed. If you work in legacy .doc, convert your document: libreoffice --headless --convert-to doc --outdir out input.docx. Be mindful of newer OOXML features which may not be translated.

Web publication may use HTML:  pandoc input.docx -s --extract-media=media -o output.html. Word margins, headers, footers, breaks, page breaks, floating images do not convert correctly. Markdown and/or plain text formats may be useful for document tracking, versioning and migration: pandoc input.docx -t gfm --extract-media=media -o output.md and/or pandoc input.docx -t plain -o output.txt. All formatting, images, comments and other layout is stripped. EPUB should use semantics of document: pandoc input.docx -o output.epub and multicol, pagination and pagebreak for print usually need to be manually processed.

Convert toToolCommand / note
PDF LibreOffice libreoffice --headless --convert-to pdf --outdir out input.docx Best for fixed-layout sharing and printing; interactive Word features, comments display, and font substitution may change output.
ODT LibreOffice libreoffice --headless --convert-to odt --outdir out input.docx Converts to OpenDocument Text for open-standard editing; complex Word-specific layout, content controls, and tracked changes may not round-trip perfectly.
HTML Pandoc pandoc input.docx -s --extract-media=media -o output.html Useful for publishing on the web; page layout, headers/footers, and some Word styling become approximate CSS/HTML.
Markdown Pandoc pandoc input.docx -t gfm --extract-media=media -o output.md Good for documentation workflows; rich page formatting, comments, tracked changes, and exact numbering are simplified or lost.
Plain text Pandoc pandoc input.docx -t plain -o output.txt Extracts readable text only; images, tables, styles, hyperlinks, fields, footnotes, and layout are removed or flattened.
DOC LibreOffice libreoffice --headless --convert-to doc --outdir out input.docx Needed for very old Microsoft Word versions; newer OOXML features may be downgraded or discarded.
EPUB Pandoc pandoc input.docx -o output.epub Useful for ebooks; requires clean heading structure for navigation, and page-oriented formatting is not preserved.

Common problems and fixes

The “Word found unreadable content in … ” error occurs when at least one XML part in a DOCX package is corrupt. Select File > Open > Browse in MS Word, pick the file and click on the down arrow beside ‘Open’ and choose ‘Open and Repair’. In case of failure use any restore feature of OneDrive/SharePoint/ File History/Backup to get earlier versions. Open a backup in LibreOffice Writer to identify the nature of broken tags.

“The file is corrupt and cannot be opened.” In the majority of cases this occurs due to an incomplete download; an e-mail gateway has edited it somehow; or there are problems with the storage of the files whether the disk or USB flash drive is corrupt. Check whether the file size matches the one on the sender's computer and whether it opens as a ZIP archive; a valid file starts with 50 4B 03 04 and includes word/document.xml and [Content_Types].xml.

“We're sorry. We can't open … because we found a problem with its contents”. Such error mostly points to an incorrect WordprocessingML. The advanced method of repairing the DOCX document implies making the copy and unzipping it then restoring XML part of word-document. Rezip a package with the original structure preserved.

If your computer is set up such that the docx documents open with a tool such as Microsoft Windows "Compressed Folders" or some other program then reset the .docx association to MS Word, LibreOffice or ONLYOFFICE. Avoid using other programs which can open this extension; never rename the document as .DOC or .PDF. To open a password-protected docx, check Caps Lock and verify that you have the exact password and the correct keyboard layout. Only then repair the damaged docx via Microsoft Word. Fonts affect all document formatting. Install the original fonts or embed them into the document before saving it as pdf. Use links manager of Word and replace objects with embedded resources if needed because links break when the linked image/Excel files are moved.

Security considerations

A standard .DOCX file doesn’t include any VBA macros; Word supports .DOCM as a format used by documents with a macro project. A .DOCX document may still consist of embedded OLE objects, field codes, links, external images, attached templates, and active-content references that may prompt Word to update data or reveal system/network information, etc.

Malformed OOXML packages have been used to exploit vulnerabilities in software such as Microsoft Word, LibreOffice, and third-party parsers. Thus, open unfamiliar files with up-to-date Office or LibreOffice builds and Protected View enabled.

The list of document elements revealing information about the file owner may include author names, company names, comments, tracked changes, hidden text, custom properties, embedded files as well as revision history, etc. Make sure your document doesn’t expose such personal and sensitive information via the File > Info > Check for Issues > Inspect Document feature in Word.

History and versions

The format known as .DOCX format has been adopted with Office 2007 for word processing as the format that followed .DOC format which is the older format used by Word 97, Word 2000, Word 2002/XP, Word 2003 for word processing. The Office Open XML Format specification became an Ecma standard through ECMA-376.

ISO/IEC has defined ISO/IEC 29500 from Office Open XML Format specification and defined conformances as Transitional conformance class and strict conformance class. Besides these Microsoft has produced Compatibility Pack for Office 2000, Office XP, and Office 2003 applications to open, edit and save Office Open XML formatted like .DOCX files created by later office versions. Office 2010 application improves Office OOXML format conformance, but still produces documents in transitional document formats mainly due to compatibility with previous office files.

Strict Open XML files started to be readable and writable with Office 2013 application; but it must be said that Transitional .DOCX files are much more frequently used than these. There have been many different editions of ECMA-376, the 5th edition corresponds to later ISO/IEC 29500 maintenance and provides information about modern Office Open XML behavior.

DOC format is the old version of MS Word Document which is used in MS Word 97-2003 files. DOC file type enjoys wide legacy use but the binary nature of the file makes it more complex to handle than the newer DOCX (based on ZIP) file type. DOCM stands for macro-enabled Document and this document should be used whenever it is needed with the VBA Macros as DOCX is specifically created without macros. DOTX format is the Word Template format used for creating documents without macros and .DOTM format is for creating document with macros.

ODT (OpenDocument Text): OpenDocument Text format is used by the programs such as LibreOffice, etc. This is an open format although it doesn’t round-trip Word Features properly. .RTF format can be handled and read through several editors, simple compared to .DOCX but lacking in image handling. PDF format is the preferred format to be used for fixed-layout distribution and printing. .PAGES file type is used by the native Apple Pages. HTML Format: .HTML can be published directly to the internet and differs from how it works on Word pages in the web browsers.

Comments (0)

Replying to

No comments yet. Be the first to share your experience with this file type.