Back to MIME Types

application/vnd.openxmlformats-officedocument.wordprocessingml.document Word Document (DOCX) Common

The modern Microsoft Word document format — a ZIP archive containing XML content, styles, and resources.

What it's for

application/vnd.openxmlformats-officedocument.wordprocessingml.document — yes, that's the actual full type string — identifies modern Microsoft Word documents (.docx), part of the Office Open XML (OOXML) format family introduced with Office 2007. Despite the intimidatingly long name, the underlying format is genuinely simple to understand: a .docx file is literally a ZIP archive containing a set of XML files (document content, styles, metadata) plus any embedded resources (images, fonts), which is exactly why renaming a .docx to .zip and extracting it reveals a readable internal folder structure.

The vnd. prefix in the MIME type indicates it's a "vendor" type (registered by/for a specific company — Microsoft, in this case), following IANA's convention for vendor-specific but still officially registered formats.

Format & syntax

Content-Type: application/vnd.openxmlformats-officedocument.wordprocessingml.document

No parameters. Because the type string is long and easy to mistype, most tooling and documentation refers to it by the shorthand "docx" rather than typing the full string repeatedly — worth knowing both, since you'll need the exact full string for actual Content-Type headers and file validation logic.

How it's used in practice

  • Document generation and export features — many web applications offer "export as Word document" or "download as .docx" features, generated server-side via libraries that construct valid OOXML-format files programmatically.
  • File upload validation for document processing — applications that accept Word document uploads (resume parsers, document management systems, content migration tools) need to correctly recognize and validate this specific MIME type among accepted formats.
  • Email attachment handling — mail systems and web-based email clients need to correctly recognize this type to display appropriate icons, previews, or handling behavior for Word document attachments.
  • Content management and collaboration platforms — many platforms that integrate with or convert Word documents (importing content, providing preview functionality) rely on correctly identifying this MIME type as part of their file-handling logic.

Common mistakes & gotchas

  • Confusing DOCX with the legacy .doc format — the older binary .doc format (pre-Office 2007) uses an entirely different MIME type (application/msword) and different, non-XML internal binary structure — the two are not interchangeable, and code that only checks for one won't correctly handle the other.
  • Mistyping the long MIME type string — because the type is genuinely long and unwieldy, manual entry mistakes (missing a segment, wrong capitalization) in server configuration or validation code are a real, common source of "why isn't my file upload being recognized correctly" bugs.
  • Assuming file extension alone is sufficient validation — relying solely on the .docx extension for upload validation (without checking the actual Content-Type or file signature) is insufficient for security-conscious validation, since a file can be renamed to any extension regardless of actual content.
  • Not accounting for the ZIP-based internal structure when doing custom processing — since DOCX is internally a ZIP of XML files, any custom document generation or manipulation code needs to understand and correctly construct this internal structure (specific required files like [Content_Types].xml, correct relationships between parts) rather than treating it as an opaque binary blob.

Comparison & FAQ

Type Purpose Key difference from DOCX
application/msword Legacy binary Word format (.doc) Older, pre-2007 binary format, not XML/ZIP-based, and not directly interchangeable with DOCX
application/rtf Cross-platform formatted text Much simpler, more limited formatting capabilities but more universal compatibility than DOCX
application/zip Generic archive format DOCX is technically a specialized ZIP archive, but should always be served with its own specific MIME type, not the generic ZIP one

Is a .docx file actually a ZIP file?

Yes, literally — renaming a .docx file to .zip and extracting it reveals a folder structure of XML files and resources, which is the actual internal format of all modern Office Open XML documents.

What's the difference between .doc and .docx MIME types?

They're completely different formats with different MIME types — legacy .doc uses application/msword (an older binary format), while modern .docx uses the long OOXML-specific type shown here. Code needs to handle both separately if supporting older Word documents.

Why is the DOCX MIME type so long?

It follows Microsoft's structured OOXML naming convention (application/vnd.openxmlformats-officedocument.[type]ml.document), which is verbose but precisely and unambiguously identifies the specific OOXML document type among the whole family of related Office formats (Word, Excel, PowerPoint all follow this same naming pattern).

Is checking the file extension enough to validate a DOCX upload?

No — for genuine security-conscious validation, check the actual file's magic bytes/ZIP signature and internal structure, not just the extension or client-supplied Content-Type, both of which can be spoofed or simply incorrect.