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
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

5 KB
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

5 KB
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

7.2 KB
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

10 KB
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

5 KB
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

8 KB
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

8 KB
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

0 B
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

10 KB
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

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

Why download corrupted files for testing?
Corrupted files are essential for QA testing — they verify your application handles invalid input gracefully. Without testing with broken files, your app may crash, show stack traces to users, or have security vulnerabilities when users upload damaged files. Every production file-handling system should be tested with intentionally corrupted inputs.
How to test error handling with corrupted files?
Upload each corrupted file to your application and verify: (1) the upload is rejected or handled gracefully, (2) the error message is user-friendly (not a stack trace), (3) the application doesn't crash or hang, (4) no data is corrupted in your database. Test both client-side validation (file type check) and server-side validation (content parsing).
What types of file corruption exist?
Four main types: (1) Truncated — file cut short, missing end-of-file markers. (2) Malformed — container is valid but internal data is corrupted or missing. (3) Wrong extension — file content doesn't match the extension (e.g., JPEG data with .pdf extension). (4) Zero-byte — completely empty file. Our samples cover all four types across 8 common formats.
How to test file upload validation?
Test three layers: (1) Client-side — does <input accept> filter work? Does the preview fail gracefully for corrupted images? (2) Server-side extension check — does renaming a JPG to .pdf pass your check? Use our sample-jpg-as-pdf.pdf. (3) Server-side content validation — does your parser catch truncated/malformed files? Our truncated PDF/JPG/MP4 files test this.
Are these corrupted files safe?
Yes. These files contain only broken/truncated data — no malware, no exploits, no malicious payloads. They are designed to trigger error handling code paths, not security vulnerabilities. The corruption is structural (missing data, wrong headers) — safe for any testing environment.
No other site offers corrupted test files — why is this unique?
Most sample file sites only provide valid files. But real users upload corrupted files constantly — partial uploads, network interruptions, format confusion. Testing only with valid files means your error handling is untested. TrueFileSize is the only site providing intentionally corrupted files across 8 formats with documented corruption types for systematic QA testing.

Related testing resources

Related reading