Skip to main content
PPDF123

Repair a Corrupted PDF

Repair PDF rewrites a damaged PDF with qpdf, rebuilding its cross-reference table so the file can open again. It recovers what qpdf can still read; it cannot bring back missing images or destroyed data.

Drag and drop files here, or click to choose

Accepts PDF · up to 500.0 MB per file · up to 20 files at once

You can also paste a file with Ctrl/Cmd+V, or from the clipboard menu.

Repair re-reads the file and rewrites it with qpdf (`qpdf input -- output`). That rewrite rebuilds the xref and can recover files qpdf still parses. It is not a forensic reconstructor for burnt streams, missing images, or DRM.

There are no options. If qpdf cannot read the file, the job fails. Password-protected files are unlocked for you on this page once you enter the password (API callers run Unlock first); Repair is not a password cracker.

A file that already opens may come back slightly different at the object level and look the same on screen.

If you only needed smaller streams, Compress is the explicit packing tool. If annotations must become page content, Flatten.

Features

  • qpdf rewrite with no extra flags
  • Fixes some xref/structure issues qpdf can parse
  • Not a content reconstructor
  • Anonymous API at /api/v1/misc/repair

When to use this tool

  • Rebuild xref on an export another tool wrote poorly
  • Try qpdf before giving up on a slightly damaged file
  • Normalize structure before Merge

How do I repair a corrupted PDF?

  1. Upload a PDF that a local qpdf might still open.
  2. Click Process. There are no repair levels.
  3. Download the rewritten PDF.
  4. Open it. If qpdf failed, the original is still the one on your disk.

Limits and edge cases

  • No deep object reconstruction
  • Not Unlock
  • qpdf-unreadable files fail
  • Upload limit on this website: 500 MB per file, sent in chunks above about 95 MB. A single direct API request body is capped at 100 MB.

Examples

  • A PDF with a messy xref that qpdf still reads often opens after Repair
  • A file cut off mid-stream usually errors

Privacy for this tool

Files are uploaded over HTTPS, processed in memory or a short-lived temporary directory on our servers, and deleted when your result is ready. We do not keep copies for later browsing, training, or advertising profiles. See the Privacy Policy for retention details and AdSense cookie disclosures.

Frequently asked questions

Will this restore a truncated download?
Only if qpdf can still parse it. Many truncated files fail outright.
Does Repair decrypt?
Only for files that open without a password (owner-password restrictions): those come back without encryption. A file that needs a password to open is rejected; use Unlock with a password you are entitled to use.
Is this the same as Compress?
No. Repair is a bare qpdf rewrite. Compress adds stream and object-stream flags.
Will text change?
Not as a rewrite of words. Object numbers and offsets usually change.

Last updated:

Call this from code

Every tool on this site is a plain REST endpoint - no account or API key needed for anonymous use. Built for AI agents and developers as much as for browsers.

curl -X POST "https://pdf123.xyz/api/v1/misc/repair" \
  -F "[email protected]" \
  -o output.pdf

Also available as an MCP tool for agent clients that speak Model Context Protocol (JSON-RPC 2.0 over POST /mcp). Full API reference

Use it from an AI agent

Skill

Claude Code, Codex, Cursor and other AI agents can run Repair PDF for you with this skill: /skills/pdf123-repair.md

All agent skills

Files are used only for this processing job and deleted automatically afterward.