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
Download 20 files (4.4 MB)Shell
# 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

FileSizeDetailsDownload
Invalid JSONinvalid.json94 BDownload
Malformed CSVmalformed.csv149 BDownload
Malformed XMLmalformed.xml212 BDownload
Truncated PDFtruncated.pdf9 KBDownload
Truncated WEBPtruncated.webp9.8 KBDownload
Truncated DOCXtruncated.docx19.8 KBDownload
Truncated JPGtruncated.jpg20.9 KBMissing the EOI marker; most viewers render the top half and grey out the rest.Download
Truncated EPUBtruncated.epub34.5 KBDownload
JPG with a damaged headerbad-header.jpg41.8 KBDownload
Truncated XLSXtruncated.xlsx56.2 KBDownload
Truncated PNGtruncated.png161 KBDownload
Truncated GIFtruncated.gif198 KBDownload
Truncated MP3truncated.mp3234 KBDownload
PNG with a damaged signaturebad-signature.png323 KBDownload
MP3 with corrupted framescorrupted-middle.mp3469 KBGlitch at about 15 seconds.Download
Truncated FLACtruncated.flac499 KBDownload
Truncated ZIPtruncated.zip523 KBDownload
ZIP with a CRC errorcrc-mismatch.zip524 KBDownload
Truncated MP4truncated.mp4532 KBDownload
Truncated WAVtruncated.wav861 KBDownload

FAQ

Are these files safe?

Yes. They are malformed on purpose but contain no executable or malicious content.