A PDF that suddenly refuses to open is frustrating. Sometimes the viewer shows "file is corrupted," sometimes it just hangs on a blank page, and sometimes it throws a cryptic error about cross-reference tables or unexpected tokens. The file is still there on your disk — the question is whether the damage is structural or deep.

Structural corruption is fixable. If the problem is a broken index, a missing end-of-file marker, or an incomplete object table, a repair tool can often reconstruct those and produce a working file from the same bytes.

Free Repair PDF — runs in your browser

Diagnose and rebuild broken PDF structure. No upload needed.

Try Repair PDF now

Why PDFs get corrupted

A PDF is a structured binary file. Its "table of contents" is a cross-reference table (xref) that tells the reader where each object starts in the file. Anything that disrupts this structure can make the file unreadable:

  • Interrupted download — the most common cause. The file was cut off mid-transfer, so the end of the file and the xref table are missing. The file exists on disk but is incomplete.
  • FTP transfer in text mode — FTP has two modes: binary and text. Text mode converts line endings, which corrupts binary data. PDFs transferred in text mode come out broken.
  • Email encoding issues — double-encoding (base64 of base64, or an attachment that went through a gateway that re-encoded it) can corrupt the binary streams inside the file.
  • Disk write errors — a drive error or power loss during a save can produce a half-written file with a valid header but missing or truncated body.
  • Buggy PDF creators — some PDF generation libraries produce files with non-standard or slightly invalid structure that strict viewers reject.

All of these primarily affect the file's outer structure (xref table, EOF marker, object offsets) rather than the actual content of the pages. That is why structural repair has a reasonable success rate: the content is often intact; only the index is broken.

What the repair tool fixes (and what it can't)

Issue Fixable by the tool? Notes
Broken cross-reference tableYespdf-lib rebuilds the xref from the object structure
Missing or malformed EOF markerYesRebuilt on re-save
Incomplete object streamsOftenDepends on how much of each object is present
Truncated file (incomplete download)PartialPages that were fully downloaded are recovered; pages beyond the cut-off are lost
Corrupted image data inside the fileNoRequires server-side tools (Ghostscript, Acrobat)
Corrupted font dataNoInternally corrupt binary streams cannot be recovered in-browser
Password-protected file (unknown password)NoCannot parse encrypted content without the key

The tool is honest about this. The limitation notice shown in the tool reads: "Repair rebuilds the PDF structure. It cannot recover binary stream data (images, fonts) that is internally corrupted — for that, a server-side tool like Ghostscript or Adobe Acrobat is needed."

How to repair a PDF step by step

1

Open the Repair PDF tool

Go to fixmypdf.tech/tools/repair.html.

2

Upload the damaged PDF

Drag the file onto the drop zone or click to browse. The file is read into your browser's memory — nothing is sent to a server.

3

Click Repair PDF

pdf-lib attempts to parse the file. Where it encounters structural errors, it reconstructs the cross-reference table and re-saves the file with a valid structure.

4

Download the repaired file

If repair succeeds, a Download button appears. The repaired PDF is generated in your browser and saved to your device. Open it in your PDF viewer to check the result.

If the repair doesn't fully work

If the tool cannot parse the file at all, or if the repaired output is still missing content, the damage is likely deeper than structural. A few options at that point:

  • Try Ghostscript — Ghostscript's recovery mode (gs -dBATCH -dNOPAUSE -sDEVICE=pdfwrite -dPDFSETTINGS=/prepress -o repaired.pdf broken.pdf) is more aggressive and can sometimes recover files that browser-based tools cannot. It is free, open source, and runs on Windows, macOS, and Linux.
  • Try Adobe Acrobat — Acrobat's repair utilities are among the most capable for structural and partial content recovery.
  • Retrieve the original — if the file came from an email, a cloud storage sync, or a download, try downloading it again from the source. The source file may be intact.
  • Check backups — Windows Previous Versions, Time Machine on macOS, or any cloud backup (Google Drive, Dropbox, OneDrive) may have an earlier copy before the corruption occurred.

Browser-based repair is the fastest first step and works for a large portion of corruption cases. For deeply damaged files, server-side tools with full binary access are the next escalation path.

Try the repair tool now

Fast structural repair in your browser. No upload, no account.

Open Repair PDF

Why browser-based matters

When a PDF is corrupted, the temptation is to reach for the first online tool you find. But that means uploading a damaged — and potentially confidential — file to a server you know nothing about. Legal documents, financial records, and medical PDFs are frequently the ones that end up corrupted (they are often emailed or downloaded from portals with unreliable connections).

FixMyPDF reads the file into browser memory and runs the repair entirely in your browser using pdf-lib. The damaged file never leaves your device. If the repair produces output, that output is also generated locally. Nothing is transmitted.

Frequently asked questions

What types of PDF corruption can the tool fix?
Broken cross-reference tables, missing EOF markers, incomplete object streams, and general structural inconsistencies. It cannot recover internally corrupted image or font data — that requires server-side tools like Ghostscript.
Why does my PDF say "file is corrupted" or refuse to open?
Most commonly: an interrupted download, a file transferred in FTP text mode, a garbled email attachment, or a disk write error. All of these primarily affect the file's structural index rather than the page content, so structural repair has a good success rate.
Will repair recover all the content?
Structural repair recovers everything that pdf-lib can parse. Pages with intact content streams but broken structural index are fully recovered. Pages where the content streams themselves are corrupted may be blank or missing.
The repair succeeded but some pages are blank. Why?
Those pages likely had corrupted content streams. The file structure is now valid, but the underlying data for those pages was too damaged to decode. For deeper recovery, try Ghostscript's repair mode or Adobe Acrobat.
Can the tool repair a password-protected PDF?
Not if you don't know the password. Remove the password first with the Unlock PDF tool (requires knowing the password), then attempt the structural repair.
Is my file uploaded to a server?
No. The entire repair runs in your browser using pdf-lib. Nothing leaves your device.