Skip to content
>_ TrueFileSize.com

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

10 KB

sample-corrupt.jpg

5 KB

sample-corrupt.png

5 KB

sample-corrupt.zip

7.2 KB

sample-corrupt.mp4

10 KB

sample-corrupt.mp3

5 KB

sample-corrupt.docx

8 KB

sample-corrupt.xlsx

8 KB

sample-zero-byte.bin

0 B

sample-jpg-as-pdf.pdf

10 KB

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

TypeDescriptionFiles
TruncatedValid header, body cut short mid-streamPDF, JPG, MP4
Malformed dataContainer valid, internal data corruptedPNG, ZIP, DOCX, XLSX, MP3
Wrong extensionFile content doesn't match extensionJPG data as .pdf
Zero-byteCompletely 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 works

Technical specifications

PurposeIntentionally corrupted for QA testing
FormatsPDF, JPG, PNG, ZIP, MP4, MP3, DOCX, XLSX
Corruption typesTruncated, malformed, wrong extension, zero-byte
Safe to useYes — no malware, no exploits, just broken data
File sizes0 B to 10 KB (small for fast testing)

Frequently Asked Questions

Related testing resources

Related reading