Corrupted & Broken Test Files Download — For QA Testing
These files are intentionally corrupted for testing purposes. They are designed to trigger error handling in your application — truncated headers, malformed data, wrong extensions, and zero-byte files. Do not attempt to open them as regular files.
Download free corrupted test files for QA testing — broken PDFs, invalid JPGs, damaged ZIPs, truncated MP4s, and MIME-type mismatches. The only sample file site that provides intentionally broken files for testing error handling, file upload validation, and graceful failure in your application.
sample-corrupt.pdf
Verified file details
- Filename
- sample-corrupt.pdf
- Exact size
- 10,240 bytes
- Displayed size
- 10 KB
- MIME type
- application/pdf
- Note
- Truncated PDF — header valid, body incomplete
- License
- CC0 / Public Domain
- Download URL
- https://truefilesize.com/files/corrupted/sample-corrupt.pdf
See how TrueFileSize generates and measures sample files, or review the editorial policy.
sample-corrupt.jpg
Verified file details
- Filename
- sample-corrupt.jpg
- Exact size
- 5,120 bytes
- Displayed size
- 5 KB
- MIME type
- image/jpeg
- Note
- Truncated JPEG — SOI marker present, data incomplete
- License
- CC0 / Public Domain
- Download URL
- https://truefilesize.com/files/corrupted/sample-corrupt.jpg
See how TrueFileSize generates and measures sample files, or review the editorial policy.
sample-corrupt.png
Verified file details
- Filename
- sample-corrupt.png
- Exact size
- 5,120 bytes
- Displayed size
- 5 KB
- MIME type
- image/png
- Note
- Invalid PNG — header present, IDAT chunk corrupted
- License
- CC0 / Public Domain
- Download URL
- https://truefilesize.com/files/corrupted/sample-corrupt.png
See how TrueFileSize generates and measures sample files, or review the editorial policy.
sample-corrupt.zip
Verified file details
- Filename
- sample-corrupt.zip
- Exact size
- 7,420 bytes
- Displayed size
- 7.2 KB
- MIME type
- application/zip
- Note
- Damaged ZIP — local file headers present, central directory corrupted
- License
- CC0 / Public Domain
- Download URL
- https://truefilesize.com/files/corrupted/sample-corrupt.zip
See how TrueFileSize generates and measures sample files, or review the editorial policy.
sample-corrupt.mp4
Verified file details
- Filename
- sample-corrupt.mp4
- Exact size
- 10,240 bytes
- Displayed size
- 10 KB
- MIME type
- video/mp4
- Note
- Truncated MP4 — ftyp box present, moov atom missing
- License
- CC0 / Public Domain
- Download URL
- https://truefilesize.com/files/corrupted/sample-corrupt.mp4
See how TrueFileSize generates and measures sample files, or review the editorial policy.
sample-corrupt.mp3
Verified file details
- Filename
- sample-corrupt.mp3
- Exact size
- 5,120 bytes
- Displayed size
- 5 KB
- MIME type
- audio/mpeg
- Note
- Invalid MP3 — ID3 header present, frame sync corrupted
- License
- CC0 / Public Domain
- Download URL
- https://truefilesize.com/files/corrupted/sample-corrupt.mp3
See how TrueFileSize generates and measures sample files, or review the editorial policy.
sample-corrupt.docx
Verified file details
- Filename
- sample-corrupt.docx
- Exact size
- 8,192 bytes
- Displayed size
- 8 KB
- MIME type
- application/vnd.openxmlformats-officedocument.wordprocessingml.document
- Note
- Damaged DOCX — ZIP container valid, XML content malformed
- License
- CC0 / Public Domain
- Download URL
- https://truefilesize.com/files/corrupted/sample-corrupt.docx
See how TrueFileSize generates and measures sample files, or review the editorial policy.
sample-corrupt.xlsx
Verified file details
- Filename
- sample-corrupt.xlsx
- Exact size
- 8,192 bytes
- Displayed size
- 8 KB
- MIME type
- application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
- Note
- Damaged XLSX — ZIP container valid, worksheet XML corrupted
- License
- CC0 / Public Domain
- Download URL
- https://truefilesize.com/files/corrupted/sample-corrupt.xlsx
See how TrueFileSize generates and measures sample files, or review the editorial policy.
sample-zero-byte.bin
Verified file details
- Filename
- sample-zero-byte.bin
- Exact size
- 0 bytes
- Displayed size
- 0 B
- MIME type
- application/octet-stream
- Note
- Zero-byte empty file — tests empty file handling
- License
- CC0 / Public Domain
- Download URL
- https://truefilesize.com/files/corrupted/sample-zero-byte.bin
See how TrueFileSize generates and measures sample files, or review the editorial policy.
sample-jpg-as-pdf.pdf
Verified file details
- Filename
- sample-jpg-as-pdf.pdf
- Exact size
- 10,240 bytes
- Displayed size
- 10 KB
- MIME type
- application/pdf
- Note
- JPEG data with .pdf extension — tests MIME type vs extension mismatch
- License
- CC0 / Public Domain
- Download URL
- https://truefilesize.com/files/corrupted/sample-jpg-as-pdf.pdf
See how TrueFileSize generates and measures sample files, or review the editorial policy.
Why download corrupted files for testing?
- Test file upload validation — verify your app rejects invalid files gracefully
- QA error handling — ensure error messages are user-friendly, not stack traces
- Test file type detection — verify MIME sniffing vs extension-based detection
- Test recovery flows — does your app offer retry/re-upload when a file is corrupt?
- Security testing — ensure corrupted files don't crash parsers or cause DoS
- Test zero-byte edge case — empty file uploads should be handled, not crash
Types of file corruption included
| Type | Description | Files |
|---|---|---|
| Truncated | Valid header, body cut short mid-stream | PDF, JPG, MP4 |
| Malformed data | Container valid, internal data corrupted | PNG, ZIP, DOCX, XLSX, MP3 |
| Wrong extension | File content doesn't match extension | JPG data as .pdf |
| Zero-byte | Completely empty file (0 bytes) | .bin |
How to test error handling with corrupted files
// Node.js — test file upload validation
const formData = new FormData();
formData.append('file', fs.readFileSync('sample-corrupt.pdf'));
const res = await fetch('/api/upload', { method: 'POST', body: formData });
// Expected: 400 Bad Request with user-friendly error message
// NOT: 500 Internal Server Error or stack trace
// Python — test file parsing error handling
try:
from PyPDF2 import PdfReader
reader = PdfReader('sample-corrupt.pdf')
except Exception as e:
# Should catch gracefully, not crash
print(f"Expected error: {e}")
// Browser — test <input type="file"> validation
// Upload sample-corrupt.jpg → verify preview fails gracefully
// Upload sample-jpg-as-pdf.pdf → verify MIME type check worksTechnical specifications
| Purpose | Intentionally corrupted for QA testing |
| Formats | PDF, JPG, PNG, ZIP, MP4, MP3, DOCX, XLSX |
| Corruption types | Truncated, malformed, wrong extension, zero-byte |
| Safe to use | Yes — no malware, no exploits, just broken data |
| File sizes | 0 B to 10 KB (small for fast testing) |
Frequently Asked Questions
Why download corrupted files for testing?
How to test error handling with corrupted files?
What types of file corruption exist?
How to test file upload validation?
Are these corrupted files safe?
No other site offers corrupted test files — why is this unique?
Related testing resources
Related reading
Generate Sample Files in the Browser (No Upload Needed)
How to generate sample files locally with Blob, TextEncoder, Uint8Array, object URLs, and a custom file size up to 1GB. No upload or backend required.
Safe Dummy File Generator with No Upload
Create private dummy files locally in your browser with a custom file size up to 1GB. No upload, no signup, and no server storage.
Test Upload Forms with Generated Files
A practical workflow for testing upload forms with generated TXT, CSV, JSON, XML, BIN, and SVG files. Includes custom file size checks up to 1GB.