Skip to content

Office Open XML word processing document · .docx

The DOCX format

A ZIP container of XML describing a reflowable document. Pagination is not stored — it is calculated when the file is opened.

DOCX stores a document as structure rather than as pages: paragraphs, runs of text, styles and tables, with no record of where page three begins. Whatever program opens the file works that out from the fonts and page setup available to it, which is the single fact that explains most DOCX frustrations.

The format itself

What DOCX actually is

Microsoft introduced DOCX with Office 2007, replacing the opaque binary .doc with Office Open XML. It was standardised as ECMA-376 and subsequently as ISO 29500, so the specification is public and independent implementations exist — which is why word processors other than Word can read and write it at all.

Rename a .docx to .zip and you can open it: inside are XML parts and media files. The document body is one XML part, with separate parts for styles, numbering definitions, fonts, headers and footers, and relationship files recording how the parts connect. Images sit in a media folder as ordinary image files. Compression is the reason a text-heavy DOCX is so small, since XML markup compresses extremely well.

The document model is reflowable. A paragraph is a sequence of runs, each carrying formatting, and the text flows continuously — there is no page geometry in the file. Page breaks, line breaks and the position of every word are computed at render time from the styles, the page setup and the font metrics actually present on the machine doing the rendering. Substitute a missing font and line widths change; change the line widths and paragraphs break in different places. That is precisely why a DOCX can paginate differently on a colleague’s computer, and why a document intended to look identical for everyone should be sent as a PDF.

Where it is the right answer

Common uses

  • 01

    Documents still being written or revised, where reflowing text is the whole point

  • 02

    Collaborative drafting with tracked changes and comments attached to the text itself

  • 03

    Templates driven by styles, so a formatting decision can be changed once and applied throughout

  • 04

    Mail merge and generated correspondence produced from a data source

  • 05

    Long-form work relying on automatic numbering, cross-references and a generated table of contents

  • 06

    The authoring stage before a final export to PDF for distribution

Both sides

What DOCX does well, and where it stops.

Strengths

  • Genuinely editable: text reflows, and structural changes propagate through numbering and references
  • Styles separate meaning from appearance, making consistent formatting maintainable
  • Open, standardised XML that non-Microsoft software can parse and generate
  • Small files for text-heavy documents thanks to ZIP compression of the XML parts
  • Carries review apparatus — tracked changes, comments and revision history — that a fixed-layout format cannot

Limitations

  • Pagination is not fixed. The same file can break pages differently depending on installed fonts and the rendering engine.
  • Fidelity depends on font availability: substituted fonts change line breaks and therefore layout.
  • Rendering differs between word processors, so complex layouts drift when opened in a different application.
  • Not a suitable distribution format when the recipient must see exactly what you saw — export a PDF for that.
  • Macros in the related .docm variant are a genuine security concern; .docx itself cannot contain them.

Specification

Technical detail

The facts worth knowing before choosing DOCX for a job, rather than after.

Full name
Office Open XML word processing document
MIME type
application/vnd.openxmlformats-officedocument.wordprocessingml.document
Extension
.docx
Introduced
Office 2007, by Microsoft
Standards
ECMA-376, ISO 29500
Container
ZIP archive of XML parts plus embedded media
Layout model
Reflowable — pagination computed at render time
Replaces
The binary .doc format
Macros
Not permitted; macro-enabled documents use .docm

Questions about DOCX

Why does my document paginate differently on another computer?

Because the page breaks are not in the file. The renderer lays out your paragraphs using the fonts and page setup it finds locally, so a substituted font with different metrics changes line widths, which changes where paragraphs break, which moves every subsequent page boundary.

What is the difference between .doc and .docx?

.doc is the older proprietary binary format; .docx is Office Open XML — a ZIP of XML parts, publicly specified as ECMA-376 and ISO 29500. The newer format is more robust to partial corruption, far more compressible, and readable by software that was never written by Microsoft.

Is converting a PDF back to DOCX reliable?

It is a reconstruction, not a reversal. The PDF contains positioned glyphs, not paragraphs, so a converter has to infer the structure — where paragraphs begin, what is a heading, which lines form a table. Simple text documents convert well; heavily designed ones need cleanup afterwards.

Can a .docx file contain a macro or virus?

Not a macro — the format does not permit macro storage, which is why the separate macro-enabled .docm extension exists. That distinction is the point: a plain .docx being emailed around is a considerably safer object than its predecessor.