Compare two PDF files
See exactly what changed between an older and a newer version, side by side, on your own device.
Older version
the original, or the one you sent
Newer version
the revised copy you received
Add both files to compare them. The older one goes on the left.
Processed in your browser. Your files are never uploaded. Check it yourself
How to compare two versions of a PDF
A revised contract, a new draft of a policy, an updated price list: the question is always the same. What is different from the copy I already read? Reading both side by side is slow and easy to get wrong, because the changes that matter are often a single number or a short phrase in the middle of a paragraph.
This tool compares the words of the two files and lists every difference, and it can also draw both files and mark the places where the pages look different. Both files stay on your device. If you only want to mark up a single file for review, use Annotate PDF.
- 1
Add the older file, then the newer one
There are two panels. Put the original, or the version you sent, in Older version, and the revised copy in Newer version. Each panel takes a file by button or by drag and drop, shows its page count and size once it is loaded, and has a Remove button if you picked the wrong one.
A password-protected file asks for its password when you add it. The comparison itself uses decrypted copies held in memory.
- 2
Choose whether to check how the pages look
Once both files are in, a tick box offers Also compare how the pages look. It is ticked for you when neither file is longer than 12 pages, and left unticked for longer ones, because drawing pages takes time. Wording is always compared, whatever you choose here.
Press Compare the two files. A progress bar counts through the pages and you can cancel it.
- 3
Read the summary and step through the changes
The top of the result counts the changes and splits them into changed, added and removed, with the word totals and page counts of both files. Underneath, both files are shown side by side at the same page number, with changes outlined: blue for changed words, green for added, red for removed. A dashed orange outline marks an area that looks different.
The list on the right shows every change with the old words struck through and the new words beside them. Click one to jump to its page. The buttons above it filter the list to changed, added or removed.
- 4
Download the evidence
Three downloads are offered. Report (PDF) and Report (plain text) list every change with its page numbers. Newer file with the differences marked is a copy of the newer file with highlights and notes added. Your two originals are never changed.
Compare PDFs features
- Finds words added, removed and changed between the two files
- Shows both files side by side with the changes marked in colour
- Optional look-different check for images, drawings and layout
- A list of every change that jumps to its page
- Report as a PDF or plain text
- A copy of the newer file with the differences marked
- Warns when a page is a scan with no text to compare
Comparing PDFs without uploading them
Both files are read in this browser tab. The words of each page are taken in reading order and lined up against each other, and the result is shown on your screen. Nothing is uploaded, so confidential drafts stay confidential.
- Words, not layout. Extra spaces and a change of font or size are not counted as a change in the text. The look-different check is there for those.
- Case and punctuation count. “Fees” and “fees” are different words, and so are “receipt.” and “receipt”.
- Moved text appears twice: once as removed where it was and once as added where it is now.
- Scans have no words to compare. Pages that are pictures of text are named, and the look-different check can still see them.
How to prove your file never left your device: a two-minute Network-tab and offline test you can run on this tool.
Two versions of a services agreement
You sent a two-page agreement and the other side returned a revised copy. Drop the original on the left and the revision on the right. With the look-different check on, you get a list of changed wording and a set of marked areas on both pages.
The list shows the delivery time changing from 14 to 21 days, the payment term from 30 to 45 days, and the setup fee from 1,800 to 2,400 pounds. The clause about subcontractors was replaced by one about confidentiality. The look check also marks a new coloured box on page 2. It has no text at all, so only the look check could have found it.
Reading a comparison well
- Put the older file on the left. “Added” then means new in the revision, and “removed” means gone from it.
- If both files came from the same source, differences are real changes. If one was re-typed or re-scanned, expect small wording noise.
- Compare is only as good as the text layer. Run OCR PDF on scanned pages first.
- Keep the report with the two files, so you can show later what you compared and when.
How two documents are lined up, in plain terms
For each file the tool reads the words of every page in reading order, noting where each word sits. It then looks for the longest run of words the two files share and treats everything between the shared runs as a difference. This is the same family of method used to compare versions of source code, so it copes well with a sentence added in the middle of a long document without flagging everything after it.
Neighbouring differences are grouped into one change. If a whole sentence was reworded, you see one change rather than a dozen. A change is one of three kinds: changed (words replaced by other words), added (words only in the newer file) and removed (words only in the older file). Where words were removed, the newer page shows a short red line at the place they used to be.
If two files have almost nothing in common, the tool does not try to be clever: it reports one large replacement instead of thousands of tiny ones.
What counts as a difference, and what does not
We tested each of these with a small file pair, so the table says what really happens.
| Difference between the files | Reported as a text change? |
|---|---|
| A word's capital letter: “Fees” against “fees” | Yes. The comparison is case-sensitive. |
| Punctuation attached to a word: “receipt.” against “receipt” | Yes. Punctuation is part of the word. |
| Extra spaces between words | No. |
| The same words in a different font or size | No in the word list. The look check marks the page. |
| A paragraph moved to another place | Yes, as removed in one place and added in the other. |
| A word hyphenated at a line end in one file only: “inter-” “national” | Yes. The two halves read as different from “international”. |
| A box, image or colour added with no text | No in the word list. The look check marks it. |
| Page numbers, headers and footers | Yes, if the words differ, because they are words on the page. |
Because of the last rows, a revised document that was re-flowed (more pages, different line breaks) can show a handful of harmless changes at the line ends. Read the list with that in mind.
The look-different check: what it sees that words cannot
The word comparison cannot see a changed logo, a recoloured chart, a new stamp, a moved photograph or a table border that was removed. The look check draws each page of both files at low resolution, lays them over each other, and marks the areas where the pixels differ by more than a small tolerance. Nearby areas are joined into one outline so you get a few boxes, not a scatter of dots.
- It covers the pages both files have. If the older file has 8 pages and the newer 10, pages 1 to 8 are checked and a note says so.
- It also lights up where wording changed, because new words are new pixels. The orange outlines overlap with the word changes; the ones with no coloured word outline beside them are the changes only the look check found.
- A different page size is handled by stretching one page to match the other before they are compared, so a document re-set from A4 to Letter will mark most of each page.
- It is slower than the word check. The word comparison of a 15-page, 6,000-word paper took about 1.4 seconds on our test PC, while the look check on the same pair took about 33 seconds. Plan on one to four seconds per page, more on a phone.
What you can take away
Report (PDF)
A plain, readable document: the two file names, the totals, then each change numbered with its pages and the old and new wording. It is typeset in a standard sans-serif font. A character that font cannot draw, such as a Chinese or Arabic letter, is written as a code point like [U+4E2D] and a note at the top says so, so nothing is lost silently.
Report (plain text)
The same list as a text file, handy for pasting into an email or a ticket.
Newer file with the differences marked
A copy of the newer file with highlights over changed words (blue) and added words (green), a note where words were removed (red) and, if you ran the look check, a thin orange rectangle round each area that looks different. These are ordinary comments, so they can be switched off or deleted in a reader. At most 1,500 marks are added, so a complete rewrite does not bury the page. Because the file is rewritten, a digital signature on it will no longer validate.
When the result needs care
- Scanned pages have no words. A scan is a picture of text. The tool names the pages that have no text layer, because “no changes” on such a page would be meaningless. Run OCR PDF first, or lean on the look check.
- Reading order can differ. Columns, text boxes and tables are read in the order a program thinks a person would read them. If the layout changed a lot between versions, the same words can be read in a different order and show as moved.
- Form values and comments. The comparison reads the text printed on the pages. If values typed into form fields or review comments matter, flatten them into the page first with Flatten PDF.
- It does not understand meaning. “Thirty” and “30” are different words. A change from “may” to “must” is one changed word, however important it is, and the list does not rank by importance.
- A report is a record of the comparison, not legal advice. It shows where wording differs; deciding what that means is for you or your adviser.
Comparing in other programs
| Where | What it does | Catch |
|---|---|---|
| Word, Review, Compare | Compares two Word documents and shows the changes as tracked changes. | Needs the Word files, not the PDFs. |
| Adobe Acrobat Pro, Compare Files | Compares two PDFs and produces a summary. | Paid edition. |
| Online comparison sites | Many compare two uploads. | Both documents are uploaded to a third party, which is often not acceptable for a contract. |
| Command-line tools | Free programs can diff the text or the rendered pages. | You need to be comfortable with a terminal. |
This tool needs only the two PDFs and keeps both on your device. To mark up one file by hand instead, use Annotate PDF; to copy a file's words out to compare in a text editor, use PDF to text.
Compare PDFs: troubleshooting
- “Some pages have no text to compare”
- Those pages are pictures of text. Run OCR PDF on them first, or rely on the look-different areas.
- It says the words are identical, but I know something changed
- The change may not be in the words: a picture, a colour, a stamp or a layout change. Compare again with “Also compare how the pages look” ticked.
- There are lots of small changes at line ends
- The text was re-flowed between versions, so hyphenated words and moved line breaks read as different words. Read the list for real wording changes.
- Almost every page is marked as looking different
- The page size or margins changed, so everything moved. The word list is the better guide in that case.
- The look check is very slow
- Drawing pages is the slow part. Untick it for long files, or compare a section at a time using Extract pages.
- “This PDF needs a password”
- Enter the password in the prompt that appears when you add the file.
- “That file couldn’t be opened as a PDF”
- Check it is the right file. If it is a PDF that will not open, run Repair PDF on it first.
- The marked copy download fails
- The file may be too large for your device’s memory with the marks added. Use the report downloads instead.
Glossary
- Text layer
- The words stored in a PDF as text. A scan has none; it holds a picture of the words.
- Reading order
- The sequence in which a program reads the words on a page: lines, columns, then the next page.
- Diff
- A list of the differences between two versions of a text.
- Look-different area
- A region where the drawn pages of the two files do not match, whether or not the words changed.
- Annotation
- A highlight or note laid over a page. The marked copy uses them so they can be removed again.
- OCR
- Optical character recognition: turning a picture of text into text.
Related tools and guides
Compare PDFs: frequently asked questions
What does the comparison look at?
The words on each page, in reading order, and optionally how the drawn pages look. It reports words added, removed and changed.
Are my PDFs uploaded?
No. Both files are compared in your browser tab, on your device. You can check this yourself.
Which file goes on which side?
The older one on the left and the newer one on the right. “Added” then means new in the revision.
Can it compare scanned documents?
Not by words, because a scan has none. It names those pages. Run OCR PDF first, or use the look-different check.
Can the two files have different page counts?
Yes. Words are compared across the whole documents. The look check covers the pages both files have, and says so.
Does it ignore formatting?
In the word list, yes: spaces, fonts and sizes do not count. The look check reports formatting and layout changes separately.
Is it case-sensitive?
Yes. “Fees” and “fees” are reported as a change, and so is a full stop added to a word.
What is in the report?
The two file names, totals, and each change numbered with its pages and its old and new wording, as a PDF or a text file.
Can I get a copy of the new file with the changes marked?
Yes. It adds highlights and notes to a copy of the newer file. They are ordinary comments you can delete in a reader.
How long does it take?
The word comparison of a 15-page paper took about 1.4 seconds on our test PC. The look check takes roughly one to four seconds per page.
Page updated · By the PDFMagpie team