Edge Cases · 20 files
Corrupt and Malformed Test Files
Deliberately broken files: truncated downloads, damaged headers and signatures, CRC errors, corrupted audio frames, and invalid JSON, XML and CSV. Use them to check that your app fails gracefully instead of crashing.
All 20 corrupt & malformed files
Download all with curl
# 20 files, 4.4 MB in total
while read -r url; do curl -LO --fail "$url"; done <<'EOF'
https://files.samplefiles.com/edge-cases/corrupt/invalid.json
https://files.samplefiles.com/edge-cases/corrupt/malformed.csv
https://files.samplefiles.com/edge-cases/corrupt/malformed.xml
https://files.samplefiles.com/edge-cases/corrupt/truncated.pdf
https://files.samplefiles.com/edge-cases/corrupt/truncated.webp
https://files.samplefiles.com/edge-cases/corrupt/truncated.docx
https://files.samplefiles.com/edge-cases/corrupt/truncated.jpg
https://files.samplefiles.com/edge-cases/corrupt/truncated.epub
https://files.samplefiles.com/edge-cases/corrupt/bad-header.jpg
https://files.samplefiles.com/edge-cases/corrupt/truncated.xlsx
https://files.samplefiles.com/edge-cases/corrupt/truncated.png
https://files.samplefiles.com/edge-cases/corrupt/truncated.gif
https://files.samplefiles.com/edge-cases/corrupt/truncated.mp3
https://files.samplefiles.com/edge-cases/corrupt/bad-signature.png
https://files.samplefiles.com/edge-cases/corrupt/corrupted-middle.mp3
https://files.samplefiles.com/edge-cases/corrupt/truncated.flac
https://files.samplefiles.com/edge-cases/corrupt/truncated.zip
https://files.samplefiles.com/edge-cases/corrupt/crc-mismatch.zip
https://files.samplefiles.com/edge-cases/corrupt/truncated.mp4
https://files.samplefiles.com/edge-cases/corrupt/truncated.wav
EOF| File | Size | Details | Download |
|---|---|---|---|
| Invalid JSONinvalid.json | 94 B | Download | |
| Malformed CSVmalformed.csv | 149 B | Download | |
| Malformed XMLmalformed.xml | 212 B | Download | |
| Truncated PDFtruncated.pdf | 9 KB | Download | |
| Truncated WEBPtruncated.webp | 9.8 KB | Download | |
| Truncated DOCXtruncated.docx | 19.8 KB | Download | |
| Truncated JPGtruncated.jpg | 20.9 KB | Missing the EOI marker; most viewers render the top half and grey out the rest. | Download |
| Truncated EPUBtruncated.epub | 34.5 KB | Download | |
| JPG with a damaged headerbad-header.jpg | 41.8 KB | Download | |
| Truncated XLSXtruncated.xlsx | 56.2 KB | Download | |
| Truncated PNGtruncated.png | 161 KB | Download | |
| Truncated GIFtruncated.gif | 198 KB | Download | |
| Truncated MP3truncated.mp3 | 234 KB | Download | |
| PNG with a damaged signaturebad-signature.png | 323 KB | Download | |
| MP3 with corrupted framescorrupted-middle.mp3 | 469 KB | Glitch at about 15 seconds. | Download |
| Truncated FLACtruncated.flac | 499 KB | Download | |
| Truncated ZIPtruncated.zip | 523 KB | Download | |
| ZIP with a CRC errorcrc-mismatch.zip | 524 KB | Download | |
| Truncated MP4truncated.mp4 | 532 KB | Download | |
| Truncated WAVtruncated.wav | 861 KB | Download |
FAQ
Are these files safe?
Yes. They are malformed on purpose but contain no executable or malicious content.