Repair PDF
A file that will not open, looked at properly. You are told which part is damaged, what can be done about it, and honestly whether it worked. Nothing is uploaded.
Drop your PDF here
They stay on your computer. Nothing is sent to a server.
How to repair a PDF that will not open
Drop the file in. It is examined before anything is changed, and what comes back is a list rather than a verdict: does it start the way a PDF must start, is the end still there, how many objects and pages can be found inside it, and will an ordinary reader open it. Then you are told what can be done, and only then is there a button.
- Drop the damaged PDF on the box above. Nothing is sent anywhere.
- Read the list of what is wrong. Each line is either a tick or a cross with the reason beside it.
- Press Repair it. The file is trimmed, read forgivingly, and written out again with a fresh index.
- If the document cannot be rebuilt but its pages can still be drawn, press Rescue the pages as pictures instead.
- Open the saved file before you throw the old one away.
What actually breaks in a PDF
Almost every damaged PDF is damaged in one of four dull ways, and none of them means the pages are gone.
Something is stuck to the front. A PDF has to begin with the five characters %PDF-, and a file that has been through a badly written server or mail program can arrive with headers, a stray blank line or a page of HTML in front of them. Strict readers refuse it on sight. Cutting the rubbish off fixes it completely.
The end is missing. The index that says where every object in the file lives sits at the end of a PDF, not the beginning - so a download that stopped early, or a file copied off a failing disk, loses the map rather than the contents. Everything is still in there; nothing can find it.
The index is wrong. It says object 12 lives at byte 90,000 and it does not, usually because something rewrote part of the file without rewriting the index to match.
One object inside is malformed, and a strict reader stops dead at it rather than stepping over it and carrying on.
The repair is the same in all four cases: trim the file back to the PDF inside it, read it with every allowance the library can be given, then copy the pages into a brand new document. Copying pulls across only what each page actually points at, so anything orphaned or broken beyond understanding is left behind rather than carried into the new file, and the index is built fresh.
When the pages can be rescued but the document cannot
Sometimes a file is too far gone to be rebuilt as a document, but a reader can still draw the pages on screen. In that case there is a second button, and it does something cruder: every page is drawn and photographed into a new PDF.
You get your pages back, and you lose the words. They stop being text and become part of a picture, so they can no longer be searched, selected or copied. It is worth knowing that the OCR tool on this site can read them back afterwards, which puts most of what was lost back into the file.
It is offered second, and described plainly, because it is a worse outcome than a real repair and nobody should end up with it by accident.
What this cannot do
If neither reader here can find anything in the file, you will be told so rather than handed a button that appears to work. A file that has been truncated to a fraction of its size, or overwritten by something else, or filled with zeroes by a dying disk, does not have a document in it any more, and no repair tool of any price can invent one.
When that happens, any other copy you have is worth more than anything this page can do: the original email attachment, a backup, a cloud folder, the downloads folder on the machine that made it, or the program that saved it in the first place, which may still have its own recovery file.
A password-protected file can be repaired, but the result is still password-protected. This site does not remove passwords.
Good to know
- Is my damaged file uploaded?
- No. It is read by your own browser and rebuilt there. Nothing is sent to a server, which matters rather more than usual here - a file you are desperate to recover is usually a file you would least like copied.
- Can you recover a PDF that was only half downloaded?
- Often, yes. The index sits at the end of a PDF, so a half-finished download usually has most of the pages and no way to find them. Rebuilding the index is exactly what this does. How many pages come back depends on how much of the file arrived.
- Why does it say my file is fine?
- Because as far as two separate readers can tell, it is. If a particular program still refuses it, the fault may be with that program rather than the file. Rewriting it anyway is harmless and sometimes settles a reader that is being difficult.
- Will the repaired file look the same?
- Yes. Nothing is redrawn and no page is changed - the same pages are written into a new, correctly formed file. The only things that can be lost are parts that were already broken beyond reading.
- Can you recover a password I have forgotten?
- No, and nothing honest can. Repairing the structure of a file is a different job from breaking its encryption, and this site does not do the second one.