Home › PDF Tools › Repair PDF

Repair PDF

Fix PDF files that refuse to open or show errors. The tool checks the file structure, rebuilds the cross-reference table and page list, salvages damaged page content and gives you a clean, working copy, with a report of exactly what was wrong. Your files never leave your device.

Last updated:

Advertisement
Advertisement

How to use the Repair PDF

  1. Add the damaged PDF by dropping it on the box or clicking to choose one or more files.
  2. Wait a moment while each file is analysed and rebuilt; large files take a few seconds.
  3. Read the report to see which problems were found and what was repaired.
  4. Press Download repaired PDF to save the fixed copy, or Download all as ZIP for several files.
  5. If pages come out blank, press Try image-based recovery to render whatever is still readable.

What the repair checks and fixes

ProblemTypical causeWhat the tool does
Data before %PDF-Email gateways, download managers, scripts that print text before the fileRemoves the junk so offsets line up again
Missing %%EOF, cut-off last objectInterrupted download, upload or copyDrops the incomplete object and rebuilds the index from what is complete
Wrong startxref or xref offsetsEdited in a text editor, bad incremental save, line-ending conversion (FTP ASCII mode)Scans all objects and writes a new cross-reference table
Wrong stream /LengthLine-ending conversion, buggy PDF generatorsFinds the real endstream and stores the correct length
Broken page tree or catalogOverwritten objects, crashed editorsCollects every page object and builds a new page list and catalog
Damaged compressed page contentDisk or memory errors inside a streamKeeps the part that still decompresses, so the page opens without errors
References to missing objectsTruncation, deleted objectsRemoves the dangling references

Tips for recovering a damaged PDF

  • Get a fresh copy first. If the PDF came from a website or email, downloading it again often fixes a truncated file instantly. Compare the file size with the original if you can.
  • Check the pages after repair. Open the repaired copy in a PDF viewer and scroll through it. Pages listed as partially recovered may miss content at the end.
  • Use image-based recovery for stubborn files. The pdf.js engine tolerates many errors that stop other readers. The result looks like the original but the text is an image.
  • Linked pages only by default. PDFs edited many times can contain old versions of pages that are no longer in the page list. Tick "Also recover pages that are not linked" if pages seem to be missing.
  • Shrink it afterwards. A repaired file is a clean rewrite; to make it smaller, run it through Compress PDF.

Frequently asked questions

How do I repair a corrupted PDF file?

Drop the PDF into the tool above. It scans every object in the file, rebuilds the cross-reference table and page list, drops unreadable objects and writes a clean copy. Press Download repaired PDF to save it. The report lists every problem it found and what it changed.

Why does my PDF say it is damaged and cannot be repaired?

The most common causes are an interrupted download or upload, which cuts off the end of the file, a broken cross-reference table after editing, extra bytes added by email or file transfer programs, and disk or USB errors that overwrite parts of the file. Most of these leave the page objects intact, so they can be recovered.

Can every PDF be repaired?

No. If the bytes that hold a page's content are missing or overwritten, that content is gone. The tool recovers every page and object that is still readable and tells you which pages were incomplete. A file that is not a PDF at all, or that contains only zeros, cannot be recovered.

What is the cross-reference (xref) table?

It is an index near the end of a PDF that lists the byte position of every object. If it is missing or its offsets are wrong, many readers refuse to open the file. Rebuilding it means scanning the whole file for objects and writing a new, correct index.

What does image-based recovery do?

It renders each readable page with the pdf.js engine, which is very tolerant of errors, and saves the result as a new PDF made of page images. Use it when the normal repair produces blank or broken pages. The text in the result is no longer selectable or searchable.

Is it safe to repair confidential PDFs here?

Yes. The repair runs entirely in your browser with JavaScript. The file is never uploaded, so contracts, statements and other private documents stay on your device.

Can it repair password-protected PDFs?

Encrypted PDFs can be rebuilt structurally, but if text looks garbled afterwards, remove the password first with an unlock tool or use image-based recovery, which can render PDFs that open without a password.

Are all the tools on FreeToolCabin tested for quality and accuracy?

Yes! Every tool on our site undergoes automated Q/A testing in real browser environments to ensure high precision, correct output, and zero errors. If you happen to spot a bug or have a suggestion, please contact us at [email protected] and our team will review it right away.

Related tools

Compress PDFReduce PDF file size while keeping it readable.PDF ViewerOpen and read PDF files in your browser with zoom, search, thumbnails and fullscreen.Unlock PDFRemove the password and print, copy or edit restrictions from a PDF you have the password for.PDF Metadata EditorView and edit a PDF's title, author, subject, keywords and dates, or clear them all.Merge PDFCombine several PDF files into one document.Protect PDF with PasswordLock a PDF with a password and AES-256 encryption, and restrict printing, copying or editing.Split PDFExtract pages or split a PDF into separate files.Delete PDF PagesRemove pages from a PDF using a visual thumbnail grid.Rotate PDFRotate one page or all pages of a PDF by 90, 180 or 270 degrees.Add Page Numbers to PDFNumber PDF pages with your choice of position, format and font.Watermark PDFStamp a text or logo watermark on PDF pages with custom opacity.Sign PDFDraw, type or upload a signature and place it on any PDF page, free and private.Fill PDF FormFill in PDF form fields online: text boxes, checkboxes, radio buttons and dropdowns.Flatten PDFFlatten PDF form fields and annotations into the page so they can no longer be edited.Grayscale PDFConvert a color PDF to grayscale or pure black and white for printing, right in your browser.PDF Word CounterCount words, characters and lines in a PDF, page by page, with top words and CSV export.Organize PDFReorder, rotate, delete and duplicate PDF pages with drag-and-drop thumbnails.Crop PDFTrim PDF margins by dragging a crop box on the page, for all pages or selected ones.Resize PDFChange PDF page size to A4, Letter, Legal, A3 or custom and scale content to fit.Redact PDFBlack out names, numbers and any text in a PDF for real: the hidden text is removed, not covered.PDF EditorAdd text, whiteout, shapes, images and drawings to any PDF page, then save a new PDF.Compare PDFCompare two PDF files and see added, removed and changed text side by side, page by page.Insert Pages into PDFInsert blank pages or pages from another PDF anywhere in your document, privately in your browser.PDF Page CounterCount the pages of many PDFs at once, with totals, page sizes and a CSV export.Add Header and Footer to PDFAdd header and footer text with page numbers, date and file name to every PDF page.Invert PDF ColorsTurn a PDF into dark mode: invert colors, keep hues or use a night sepia theme for easy reading.PDF N-UpPrint 2, 4, 6, 9 or 16 PDF pages per sheet with your own order, margins and borders.PDF Booklet MakerTurn a PDF into a print-ready folded booklet: pages imposed 2 per sheet in saddle-stitch order.Add Stamp to PDFStamp APPROVED, PAID, DRAFT or custom text with a date onto any PDF page.Remove Blank Pages from PDFFind and delete empty or near-blank pages in a PDF automatically.Add Bookmarks to PDFAdd, edit and nest PDF bookmarks (outline) or auto-generate them from headings, in your browser.Add Margins to PDFAdd white space margins or a binding gutter to PDF pages, enlarging pages or scaling to fit.Alternate Merge PDFInterleave two PDFs page by page, e.g. scanned fronts and backs, into one combined file.Bates Numbering PDFStamp sequential Bates numbers on one or many PDFs, numbered continuously across files.Change PDF Background ColorGive PDF pages a sepia, cream, pastel or custom background color behind the text.Create Fillable PDF FormTurn any PDF into a fillable form: add text fields, checkboxes, radio buttons and dropdowns.Extract Highlights from PDFPull highlighted text and comments out of a PDF with page numbers; export to Markdown, TXT or CSV.Extract Links from PDFList every hyperlink and URL in a PDF with page numbers; copy them or export as CSV.Check Register PrintablePrint a blank check register or fill one in online with an automatic running balance.Debt Payoff Tracker PrintableTurn your debts into a printable snowball or avalanche coloring tracker with a payoff date.Time Off Request FormMake a PTO request form with dates, leave type, hours and approval, as a fillable PDF.Extract PDF AttachmentsList the files embedded in a PDF and download them one by one or all as a ZIP.PDF to Speech ReaderListen to any PDF read aloud with your browser's voices, with speed control and highlighting.Remove Annotations from PDFStrip comments, highlights, sticky notes and drawings from a PDF, with counts per page.Reverse PDF Page OrderFlip the page order of one or many PDFs in one click, with a thumbnail preview.Split PDF Pages in HalfCut each PDF page into two pages, left/right or top/bottom, ideal for scanned book spreads.Savings Tracker PrintableColor-in savings goal tracker: jar, grid or thermometer for any goal and amount per cell. Print PDF.Book Interior FormatterTurn a manuscript into a print-ready 6x9 (or any trim size) book PDF with gutters, headers and page numbers.Book Spine Width CalculatorSpine width and full cover size with bleed from page count, paper type and trim size.Mail Merge to PDFMerge a {{field}} letter template with CSV or Excel rows into personalized PDFs, combined or zipped.
See all 51 Edit & Organize PDF →