application/vnd.openxmlformats-officedocument.wordprocessingml.document

DOCX sample document files for testing

Download a verified DOCX fixture for Office uploads, MIME validation, package inspection, preview conversion, and storage tests.

Verified . ZIP signature, Office MIME, package entries, exact bytes, SHA-256, and download behavior are verified.

Identify DOCX files

Magic signature
50 4B 03 04 (ZIP package)
Registered MIME
application/vnd.openxmlformats-officedocument.wordprocessingml.document

DOCX is a ZIP-based OPC package. Confirm [Content_Types].xml and word/ entries before classifying it as a Word document.

Choosing DOCX

DOCX is an Office Open XML ZIP package supported by Microsoft Office and common document libraries. Browser preview usually requires conversion.

Validate the ZIP signature and Word package structure.

Preserve the original while generating previews asynchronously.

Common test cases

  • Office upload validation
  • Preview conversion
  • Package and metadata inspection

Invalid and boundary cases

  • Generic ZIP renamed to DOCX
  • Missing package relationships
  • Macros or external relationships

DOCX fixture matrix

FileStructureMIMESize
Sample document DOCXsample-document.docx1 pageapplication/vnd.openxmlformats-officedocument.wordprocessingml.document11 KB

Verify the representative fixture

Each command downloads sample-document.docx and uses its published URL. The Node.js and Python examples also verify the exact byte count and SHA-256 digest.

curl

Download the published fixture and inspect its response headers before saving the exact bytes.

curl --fail --location --silent --show-error \
  --output sample-document.docx \
  --write-out 'status=%{http_code}\ncontent_type=%{content_type}\nbytes=%{size_download}\n' \
  'https://assets.testfiles.dev/documents/sample-document.docx'
wget

Save the stable fixture URL without changing the published byte stream.

wget --output-document='sample-document.docx' 'https://assets.testfiles.dev/documents/sample-document.docx'
Node.js

Verify the downloaded byte count and SHA-256 digest in a Node.js workflow.

import assert from "node:assert/strict";
import { createHash } from "node:crypto";

const response = await fetch("https://assets.testfiles.dev/documents/sample-document.docx");
assert.equal(response.ok, true);
assert.match(response.headers.get("content-type") ?? "", /application\/vnd.openxmlformats-officedocument.wordprocessingml.document/i);

const bytes = Buffer.from(await response.arrayBuffer());
assert.equal(bytes.length, 11204);
assert.equal(createHash("sha256").update(bytes).digest("hex"), "c71a5f6effc5ead9f855465713c6f9874dce435d14b7d88afd3ce6f24c6c8a70");
console.log("Verified sample-document.docx", bytes.length, "bytes");
Python Requests

Verify the same fixture from a Python test or processing pipeline.

import hashlib
import requests

url = "https://assets.testfiles.dev/documents/sample-document.docx"
response = requests.get(url, timeout=30)
response.raise_for_status()

assert "application/vnd.openxmlformats-officedocument.wordprocessingml.document" in response.headers.get("content-type", "")
assert len(response.content) == 11204
assert hashlib.sha256(response.content).hexdigest() == "c71a5f6effc5ead9f855465713c6f9874dce435d14b7d88afd3ce6f24c6c8a70"
print("Verified sample-document.docx", len(response.content), "bytes")

Continue testing

Related formats

Copied