🩹
PDF/PDF Repair

PDF Repair

Diagnose a broken PDF and rebuild it with a fresh cross-reference table — structural recovery, entirely in-browser.

100% LOCAL5-point diagnosisxref rebuildSalvage report100% local
Saved Reports· Auto-save on
The CalculatorPage 1
🩹
Drop a damaged PDF here, or click to browse
Diagnosis reports what is broken; the rebuild fixes what can be fixed
🩹

Drop a broken PDF for a five-point diagnosis and structural rebuild

Data Source & Legal Disclaimer
Effective: 2026Last updated: TodayUpdate: Manual review
Sources: pdf-lib structural rebuild

Repair runs entirely in your browser with pdf-lib and pdf.js. Your file is never uploaded. Structural recovery has limits — a truncated file cannot regrow missing bytes.

See all data sources & update policy →
How it worksPage 2

What a PDF repair can and cannot fix — honestly

A PDF is a graph of numbered objects plus a cross-reference table (xref) that maps each object number to its byte offset. Most "corrupted PDF" failures are structural: a bad xref after a botched download, an interrupted write that truncated the file, offsets shifted by an email gateway, or a trailer that lost its %%EOF. This tool runs two independent parsers — pdf.js (the tolerant renderer browsers use) and pdf-lib (a strict parser) — and when the strict parser succeeds, it re-serializes every object with a fresh xref table and trailer, which fixes bad offsets, orphaned references, and malformed trailers. What it cannot do is regenerate bytes that are simply gone: a truncated file stays truncated, and image data that never made it into the file cannot be re-invented. The diagnosis panel tells you which case you are in — five checks, each marked ok, warn, or fail with an explanation.

Five checks → strict parse → object re-serialization → fresh xref
Diagnosis ×5header · render · objectsencryption · EOFok / warn / fail eachStrict parsepdf-lib walks the objectgraph ignoring the brokenxref offsetsRe-serializeobjects rewritten in orderobject streams packedoffsets recomputedRepaired PDFfresh xref + traileropens in any viewertruncated files stay truncated — missing bytes cannot be re-invented

The rebuild rewrites the object graph with a new cross-reference table — the fix for most 'file is damaged' errors.

The invoice that would not open — Dana's recovery

Dana's accounting system rejects a vendor invoice with "file is damaged", but the vendor insists it opens on their side.

  1. Diagnose:Three of five checks fail: the render layer parses zero pages, the strict parser rejects the object graph, and the EOF marker is missing — a classic truncated email attachment
  2. Identify the cause:The diagnosis points to a gateway that cut the transfer at 80%: the missing 20% contains the xref and half the page objects
  3. Partial recovery:Because the strict parser still walks the surviving objects, the rebuilt copy recovers 9 of 12 pages — the accounting system accepts it and the amounts match the PO
  4. Prevent recurrence:She asks the vendor to resend as a zip; the diagnosis panel had already ruled out encryption and header issues, saving hours of guessing