Truncated JPG image for testing (corrupted)
A damaged JPEG: the first half of a valid 800 × 600 image. The header states the full dimensions, but the picture data stops half-way, with no end-of-image marker.
Download
sample-jpg-truncated.jpg
55.2 KB56,556 bytes
Download JPG sampleDirect download. No sign-up and no waiting.
- Type
- image/jpeg
- SHA-256
9aed5e37502f664321ed2a2b8804e337f4a9179ffe8968a2fa36855dccdf4d02- Direct URL
https://sampletestfiles.com/downloads/samples/sample-jpg-truncated.jpg
This file is invalid on purpose. The file ends half-way through its compressed picture data, without the end-of-image (FF D9) marker.
Why test with this file
Tests image pipelines against a partial upload. Browsers draw the top of the picture and fill the rest with grey, while stricter decoders refuse the file, so different parts of one system can disagree about it.
| Damage | Truncated to 50% of its length |
|---|---|
| Dimensions in header | 800 × 600 px |
| Signature (FF D8 FF) | Present |
| End-of-image marker (FF D9) | Missing |
| Lenient decoders | Show the upper part of the image |
| Strict decoders | Report a truncated or premature end of file |
What to check
After your application has processed sample-jpg-truncated.jpg, confirm that:
- The upload is rejected, or the image is marked as damaged, rather than a half-grey thumbnail being published.
- Reading the dimensions alone succeeds (800 × 600), which is why a header check is not enough to accept an image.
- A resize or conversion job fails with a handled error and does not retry forever.
First bytes of the file
The first 64 bytes of sample-jpg-truncated.jpg as a hex dump: offset, bytes, then the same bytes as text. The JPG signature is FF D8 FF.
00000000 ff d8 ff e0 00 10 4a 46 49 46 00 01 01 00 00 01 |......JFIF......|
00000010 00 01 00 00 ff db 00 43 00 03 02 02 03 02 02 03 |.......C........|
00000020 03 03 03 04 03 03 04 05 08 05 05 04 04 05 0a 07 |................|
00000030 07 06 08 0c 0a 0c 0c 0b 0a 0b 0b 0d 0e 12 10 0d |................|Preview
No preview is offered, because this file is damaged on purpose. Download it and give it to the software you are testing.
Technical details
| File name | sample-jpg-truncated.jpg |
|---|---|
| Format | JPG (JPEG image) |
| Extension | .jpg |
| MIME type | image/jpeg |
| Size | 56,556 bytes (55.2 KB) |
| Kind | Binary |
| Signature | FF D8 FF |
| SHA-256 | 9aed5e37502f664321ed2a2b8804e337f4a9179ffe8968a2fa36855dccdf4d02 |
| Created | 2026-10-10 |
| Validation | Deliberately invalid. Independent parsers were confirmed to reject or flag the file when it was generated |
| Preview | Not offered for deliberately damaged files |
| Source | Generated for this site; not copied from elsewhere |
| Licence | Free to use, modify and redistribute (terms) |
| Category | Images |
Damaged on purpose, and otherwise harmless: the file holds the same generated content as the valid samples. As with any download, scan the file with your own security tools before opening it. How files are made and checked
Download from the command line and verify
Fetch the file with curl, then compare its checksum with the SHA-256 value above.
curl -o sample-jpg-truncated.jpg 'https://sampletestfiles.com/downloads/samples/sample-jpg-truncated.jpg'
sha256sum sample-jpg-truncated.jpg # Linux
shasum -a 256 sample-jpg-truncated.jpg # macOSOn Windows, run Get-FileHash sample-jpg-truncated.jpg -Algorithm SHA256 in PowerShell. A matching value proves that the download is complete and unaltered.
Where it fits
- File upload testing
Test an upload form or endpoint with files of every size and type it should accept, and several it should refuse.
- File parser testing
Well-formed files and deliberate edge cases for testing code that reads CSV, JSON, XML, PDF and more.
- QA testing
A ready-made set of ordinary and awkward files for exploratory testing and test plans.