Corrupted DOCX file for testing (truncated)
A damaged Word document: the first 70% of a valid DOCX file. It still begins with the ZIP signature, but the directory at the end of the package is missing.
Download
sample-docx-corrupted.docx
35 KB35,840 bytes
Download DOCX sampleDirect download. No sign-up and no waiting.
- Type
- application/vnd.openxmlformats-officedocument.wordprocessingml.document
- SHA-256
d5c0d7e6252dcbf1255ee40c279af2b4bd206534a8a054b8e07a7f8fc2b84f7b- Direct URL
https://www.sampletestfiles.com/downloads/samples/sample-docx-corrupted.docx
This file is invalid on purpose. The file ends before the ZIP central directory, which a reader needs in order to find the parts of the document.
Why test with this file
Tests document handling against a file that passes a signature check and then cannot be opened. A word processor may offer to recover the text; most libraries report that the file is not a ZIP archive.
| Damage | Truncated to 70% of its length |
|---|---|
| Signature (50 4B 03 04) | Present |
| ZIP central directory | Missing |
| Word processors | Report a problem with the file and may offer to recover its text |
| Libraries such as python-docx and Apache POI | Report that the file is not a valid ZIP package |
What to check
After your application has processed sample-docx-corrupted.docx, confirm that:
- The file is rejected with a message that says the document is damaged, not that its type is unsupported.
- A conversion or indexing job fails once and is not retried indefinitely.
- Nothing is saved that later appears to users as a valid document.
First bytes of the file
The first 64 bytes of sample-docx-corrupted.docx as a hex dump: offset, bytes, then the same bytes as text. The DOCX signature is 50 4B 03 04.
00000000 50 4b 03 04 14 00 00 00 08 00 00 00 21 5c fc a7 |PK..........!\..|
00000010 ae d0 9d 01 00 00 fc 06 00 00 13 00 00 00 5b 43 |..............[C|
00000020 6f 6e 74 65 6e 74 5f 54 79 70 65 73 5d 2e 78 6d |ontent_Types].xm|
00000030 6c b5 95 b1 6e db 30 10 86 f7 3e 85 a0 45 43 20 |l...n.0...>..EC |Preview
No preview is offered, because this file is damaged on purpose. Download it and give it to the software you are testing.
Technical details
| File name | sample-docx-corrupted.docx |
|---|---|
| Format | DOCX (Word document (Office Open XML)) |
| Extension | .docx |
| MIME type | application/vnd.openxmlformats-officedocument.wordprocessingml.document |
| Size | 35,840 bytes (35 KB) |
| Kind | Binary |
| Signature | 50 4B 03 04 |
| SHA-256 | d5c0d7e6252dcbf1255ee40c279af2b4bd206534a8a054b8e07a7f8fc2b84f7b |
| Created | 2026-10-10 |
| Validation | Deliberately invalid. Independent parsers were confirmed to reject or flag the file when it was generated |
| Preview | Not offered for deliberately damaged files |
| Source | Generated for this site; not copied from elsewhere |
| Licence | Free to use, modify and redistribute (terms) |
| Category | Documents |
Damaged on purpose, and otherwise harmless: the file holds the same generated content as the valid samples. As with any download, scan the file with your own security tools before opening it. How files are made and checked
Download from the command line and verify
Fetch the file with curl, then compare its checksum with the SHA-256 value above.
curl -o sample-docx-corrupted.docx 'https://www.sampletestfiles.com/downloads/samples/sample-docx-corrupted.docx'
sha256sum sample-docx-corrupted.docx # Linux
shasum -a 256 sample-docx-corrupted.docx # macOSOn Windows, run Get-FileHash sample-docx-corrupted.docx -Algorithm SHA256 in PowerShell. A matching value proves that the download is complete and unaltered.
About DOCX
The default Microsoft Word format since 2007: a ZIP package of XML parts.
Where it fits
- File upload testing
Test an upload form or endpoint with files of every size and type it should accept, and several it should refuse.
- File parser testing
Well-formed files and deliberate edge cases for testing code that reads CSV, JSON, XML, PDF and more.
- QA testing
A ready-made set of ordinary and awkward files for exploratory testing and test plans.