Test files › Office documents › document.docx

Sample DOCX file (document)

Word document (OOXML) with a heading and two paragraphs.

↓ Download document.docx
Filenamedocument.docx
FormatDOCX
Size1.1 KB (1,082 bytes)
MIME typeapplication/vnd.openxmlformats-officedocument.wordprocessingml.document
SHA-25608deccf7b4eb6de82226463b72076dbefbc7fcc89b1c691ed5a83a5db349954c
What this file catchesA minimal but valid DOCX built from source as a ZIP of XML parts. Opens in the corresponding application; use it to exercise upload, parsing and preview without shipping a real document. Also checks that your MIME sniffing recognises a .docx as a ZIP-based OOXML package rather than mislabelling it application/zip.

Handle it in code

Each snippet below was run against this exact file with Python 3.14.4 and Node 24.15.0 when this page was built, and the output shown is what it printed.

Python

A DOCX that passes a ZIP check can still be unopenable. Check for the parts Word requires.

import zipfile

with zipfile.ZipFile("document.docx") as z:
    names = set(z.namelist())

if "[Content_Types].xml" not in names:
    print("rejected: a valid ZIP but not an Office file (no [Content_Types].xml)")
elif "word/document.xml" not in names:
    print("rejected: no word/document.xml")
else:
    print("has the parts a DOCX needs")

Run against this file, it prints: has the parts a DOCX needs

Related guides and tools

Sample DOCX (Word) fileFile signaturesMIME typesCheck a file's real typeVerify its SHA-256

Download & verify

curl -fsSL -o "document.docx" "https://files.hexaqa.com/office/document.docx"
curl -fsSL "https://files.hexaqa.com/office/document.docx" | sha256sum # expect: 08deccf7b4eb6de82226463b72076dbefbc7fcc89b1c691ed5a83a5db349954c

More office documents test files

corrupt-missing-content-types.docxdocument.odtformula-injection.xlsxlegacy-workbook.xlsmacro-enabled.xlsmpresentation.odppresentation.pptxspreadsheet.ods

← All Office documents files