Corrupt file generator — broken ZIP, PNG, PDF and DOCX, on demand

Build deliberately-damaged sample files to test your repair tools, importers and error paths against realistic corruption — each one a genuinely valid file with one specific structural element broken, and a plain-language note of exactly what was destroyed.

The samples are assembled in your browser — 0 bytes uploaded.

Broken ZIP

ZIP archive · index loss

A valid single-entry stored ZIP whose end-of-central-directory record is destroyed, so extractors can no longer find the archive index — while the entry's data survives untouched.

Broken PNG

PNG image · chunk damage

A valid 1×1 PNG (signature, IHDR, one stored-deflate IDAT, IEND), then damaged: either the IHDR chunk's CRC is flipped, or the file is cut off before its IEND terminator.

Broken PDF

PDF document · trailer damage

A minimal valid PDF (catalog, pages, one page, a real cross-reference table), then damaged: either every xref offset is rewritten to point past the end of file, or the startxref pointer and %%EOF trailer are removed entirely.

Broken DOCX

Word OOXML · index loss (ZIP)

A minimal Word document is an OOXML package — which is a ZIP. This builds a valid three-part package, then zeroes its central directory: the parts and their local headers survive, but the directory that indexes them is gone.

100% in your browser. 0 bytes uploaded — every sample is assembled locally and downloaded straight from a Blob URL. Nothing is sent anywhere.

In short

This tool generates files that are broken on purpose. Pick a format and a damage mode and it constructs a real, valid file in the browser, breaks one named part of its structure, and downloads the result — with a short note describing precisely what it did. Nothing is uploaded and nothing on your disk is touched; the bytes are built from scratch each time you click.

Why deliberately-corrupted test files matter

Software that reads files has to cope with files that are wrong: a download that stopped halfway, a byte flipped in transit, an archive whose index never got written. But damaged inputs are awkward to come by on demand, and "just delete some bytes" produces unpredictable, hard-to-describe breakage. A generator that damages one specific structural element — and tells you which — gives you reproducible fixtures you can commit, cite in a bug report, and reason about.

Each sample here starts fully valid. The ZIP carries a correct CRC-32 over real stored data; the PNG has a valid 8-byte signature, an IHDR with real geometry and a proper stored-deflate IDAT; the PDF has a genuine cross-reference table with accurate offsets; the DOCX is a well-formed OOXML package. Only then is a single element broken, so the difference between "valid" and "corrupt" is exactly one known change — which is what makes it a useful test.

What each mode breaks

ZIP & DOCX — index loss

The archive's end-of-central-directory record is zeroed or truncated (ZIP), or the central directory itself is zeroed (DOCX). The entries and their local headers survive, so this is the classic case a good repairer rebuilds around. A DOCX is an OOXML package, which is a ZIP, so it fails and recovers the same way.

PNG — chunk damage

Either the IHDR chunk's CRC is flipped, so a strict decoder rejects an otherwise-fine header, or the file is truncated just before its IEND terminator, mimicking an interrupted download. Both are common, distinct failure signatures for a reader to detect.

PDF — trailer damage

Either every cross-reference offset is rewritten to point past the end of file, so the xref table is present but useless, or the startxref pointer and the %%EOF trailer are removed entirely, so a reader can't find where the cross-reference begins.

How to test a repair or inspection tool with these

Generate a sample and read the note beneath the button — it names the exact damage. Feed the file to the tool under test and check two things. First, detection: does it identify the specific failure, or does it crash, hang, or silently accept a broken file? Second, recovery: for the index-loss samples, whose data survives, does it produce a file that opens correctly? You can cross-check detection against IntactFile's own read-only structure inspectors, which name the same classes of damage, and then try a rebuild with therepair tools.

Why "no upload" is verifiable, not a slogan

Every sample is assembled from raw bytes by JavaScript running on your machine and delivered through an in-memory Blob URL; the page makes no request that carries any data. You don't have to take that on faith — open DevTools, select the Network tab, and generate a file: nothing goes out. The same principle underpins IntactFile's inspection and repair tools, which read your files locally rather than uploading them.

FAQ

What is a corrupted file generator for?

It produces files that are intentionally broken in specific, known ways, so you can test how your software behaves against real damage instead of hoping you'll stumble on a bad file in production. It's for building test fixtures, reproducing bug reports, and checking that a repair routine, an importer, or an error path actually does what you expect.

Are these files actually damaged, or just renamed?

Actually damaged. Each sample starts as a genuinely valid file — a real ZIP with a correct CRC-32, a real PNG with a valid signature and IHDR, a minimal but well-formed PDF, a proper OOXML package — and then a single, named structural element is broken: the ZIP's index record, the PNG's IHDR CRC, the PDF's cross-reference, the DOCX's central directory. Nothing is faked with the extension.

Does anything get uploaded?

No. The bytes are constructed entirely in your browser and handed straight to a download via a Blob URL — 0 bytes are sent anywhere. You can confirm it: open DevTools, switch to the Network tab, and generate a file; no request carries any data.

How do I use these to test a repair tool?

Generate a sample, note the damage described beneath the button, then feed the file to the tool under test and check two things: that it detects the specific failure, and — where the surviving data allows — that it rebuilds a working file. The index-loss samples (ZIP, DOCX) are the classic case a good repairer recovers, because the entries themselves are intact.

Why is a broken ZIP recoverable but a bad PNG CRC often not?

The ZIP and DOCX samples lose their index but keep every entry's compressed data, so a repairer can scan the local headers and rebuild the directory around what survived. A flipped IHDR CRC signals damage to the header bytes themselves; when a chunk's own payload is corrupt there's no redundancy to recover from, so those samples are useful mainly for testing detection and error handling.

Next: check a file with the structure inspectors · or, if a real file is damaged, repair a file