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
sample-corrupt.jpg
sample-corrupt.png
sample-corrupt.zip
sample-corrupt.mp4
sample-corrupt.mp3
sample-corrupt.docx
sample-corrupt.xlsx
sample-zero-byte.bin
sample-jpg-as-pdf.pdf
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
Related testing resources
Related reading
PDF Parsing and Text Extraction — A Practical Guide
Extract text, metadata, and structure from PDF files with pdf.js and pdf-parse. Handle scanned PDFs with OCR. Sample PDFs from 1KB to 100MB for every test case.
Testing Word and Excel Uploads in Production
Validating DOCX and XLSX uploads — size limits, macro detection, corrupted files, and viewer compatibility. Sample office files for every edge case.
Image Optimization for Web Performance
Modern formats, responsive srcset, lazy loading, and CDN tricks. Cut LCP by 40% with proper image optimization. Sample JPG, PNG, and WebP files included.