Rebuild a PDF's structure
A file that opens but misbehaves: a reader that stumbles on it, a script that chokes, a signature that won't validate. Rebuilding parses it and writes it out again cleanly: new cross-reference table, orphaned objects dropped, streams recompressed. Then it checks the result the same way it checked the original.
Drop the PDF you want rebuilt
or choose a file
The qpdf engine (about 430 KB) is fetched only when you press the button, and it runs in this tab.
—
—🧰
What rebuilding actually does. qpdf parses the file from scratch and writes it out again: the cross-reference table is rebuilt, unreferenced objects are dropped, and streams are recompressed. Not one byte of page content is reinterpreted, so text stays text. In practice the rebuilt file is often smaller — we had a 20-page file go from 17.5 KB to 12.8 KB. Small inconsistencies that readers tolerate but strict parsers flag get normalised during the rewrite.
⚠️
What it cannot do. It cannot pull a file back from the dead. We tested four kinds of damage against this build: a truncated file, a
startxref pointing at the wrong offset, corrupted object bytes, and a stream with the wrong /Length. qpdf refused all four, reported an error, and produced nothing. If your file is in that state, this tool says so plainly instead of handing you a broken output. Re-export it from the program that produced it.