pdftoolskit.org
PDF (Portable Document Format) utilities, in the browser
Say hi →

Repair a Damaged PDF

rebuilds the xref · rasterised recovery fallback · no upload

A PDF that will not open is usually structurally broken rather than truly lost. This parses what it can and writes a fresh file with a clean cross-reference table — and if that fails, falls back to rendering every page that still renders and rebuilding the document from those images.

Drop the damaged PDF here

One or many · a repaired copy per file

    no files
    Ready.

    Want to see it work? The sample library has a deliberately corrupted PDF. More free sample files.

    What "damaged" usually means

    Most unopenable PDFs have a broken cross-reference table — the index that tells a reader where each object lives. It goes wrong after an interrupted download, a bad FTP transfer in text mode, a crash during save, or a tool that wrote an incremental update badly. The objects themselves are usually all still there, so re-parsing the file and writing a fresh index fixes it completely and losslessly.

    Genuine data loss — a truncated file, a corrupted content stream, damaged embedded fonts — cannot be undone. That is where the rasterised fallback earns its place: whatever pdf.js can still render is captured as an image, so you keep the pages instead of the file.

    The two repair paths

    The report says which path was used and what it found, so you know whether you are holding a lossless repair or a photograph of one.

    If neither works

    1. Check the file size against the original — a file that is obviously short was truncated in transfer, and re-downloading is the only fix.
    2. Look at the first bytes: a valid PDF starts with %PDF-. If yours starts with HTML, you downloaded an error page.
    3. Try opening it in a different viewer first — some readers repair silently on open and can re-save a working copy.
    4. For a password-protected file that reports a different error, use Lock / unlock instead.

    FAQ

    Will repairing lose anything?

    The structural rebuild is lossless for content — text, images, links and form fields are all preserved. It does invalidate any digital signature, because the bytes change. The rasterised fallback loses the text layer by definition.

    Why does the repaired file open but look wrong?

    Because the damage was in the content, not the index. If a content stream or an embedded font is corrupt, a valid file structure cannot recover the missing bytes. The rasterised path at least captures what a renderer can still make of the page.

    Can it fix "the file is damaged and could not be repaired"?

    Often, yes — that message from Acrobat usually means a broken xref, which is exactly what the structural rebuild replaces. If our parse also fails, the fallback recovers the pages it can render.

    Does it remove passwords?

    No. Encryption is ignored while parsing so that a damaged encrypted file can still be read, but the tool does not break or strip protection. Use Lock / unlock for a file whose password you have.

    Is my file uploaded?

    No. Repair happens in your browser, which also means a confidential broken file does not have to be sent to a stranger to be fixed.

    Related tools