pdf tool

Compare two PDFs

To compare two PDFs, drop the original and the changed version: the text of both is read and lined up word by word, and every wording change is listed with its page in each file. Click a change to see both pages side by side with the words marked.

Loading the tool…

How it works

  1. 1

    Drop the original

    Put the version you started from in the first box. It is read in this page and never uploaded.

  2. 2

    Drop the changed version

    Put the version that came back in the second box. As soon as both are read, the comparison runs.

  3. 3

    Read the list of changes

    Each change shows the words taken out in red, the words put in in green, a few words either side for context, and the page in each file. Tick Ignore capitals or Ignore punctuation if those differences do not matter.

  4. 4

    Check each one on the page

    Click a change, or use Previous change and Next change, and both pages appear side by side with the words marked. Download the list to keep with the files. Nothing is stored, ever.

How the comparison works

A PDF stores its words as runs of text placed at positions on the page. The tool reads those runs from every page with pdf.js, splits them into words and punctuation, and remembers where each word sits. It then lines the two sequences up with the Myers difference algorithm, the method behind most diff tools, which finds the smallest set of words to take out and put in to turn the original into the changed version. Changes within two words of each other are grouped, so 30 days becoming 14 business days reads as one change, not three.

Why reflowed text does not show as changed

Two versions of a contract often wrap differently: one inserted word pushes every line after it along. Comparing line by line would flag the whole paragraph. Comparing word by word ignores where the lines break, and a word that a hyphen split across two lines is joined back together first, so only the words that really changed are listed. The page numbers in each change come from both files, which helps when an insertion has pushed later clauses onto the next page.

Checking an agreement that came back

The common case is an agreement you sent out and received back with edits that were not marked. Drop your copy as the original and theirs as the changed version, then step through the list. Look hardest at numbers, dates, names and the small words that change meaning, such as may, must, not and within. Ignoring capitals is safe for most reviews. Ignoring punctuation is not, because a moved comma can change which items a clause covers.

Limits worth knowing

This compares text, nothing else. A new logo, a moved image, a changed font or a different page size shows no difference, and neither does a signature added as a picture. Scanned pages are pictures of text, so they read as empty; run them through OCR software first. Text stored in an unusual order, such as a table written column by column in one file and row by row in the other, can show as moved words. Text hidden on the page, such as white text on a white background, is compared like any other text.

Once both sides agree

When the wording matches, the agreed PDF is the one to sign. An e-sign envelope takes one PDF of up to 25 MB, with up to 25 recipients and their fields placed on its pages. A PDF with rotated pages is refused at upload, so save any sideways pages upright before you send it.

Limits

  • Text comparison only: a change to the layout, a picture, a signature image or the font of a word shows no difference.
  • Scanned pages have no text layer, so they show no differences. Pages with no text are named in a message, and a file with no text at all gets a note to run OCR first.
  • A word split by a hyphen at the end of a line is joined back up, so text that only reflowed onto new lines does not show as changed.
  • When the two files share almost nothing, the change is shown as one replaced block rather than word by word.

What it does not do

  • It does not compare images, colours, fonts or page layout.
  • It does not merge the two versions or accept and reject changes like tracked changes in a word processor.
  • It does not open password protected PDFs.

Questions people ask

Can I compare a Word document with a PDF?

Not directly. Save the Word document as a PDF first, using Save As or Export in the word processor, then compare the two PDFs. The two files can come from different apps, because only the words are compared, not how each app laid them out. Any difference the tool then reports is a real change in the text.

Will it find a change inside a table?

Yes, if the table is text. Each cell's words are read in the order the file stores them, which is usually row by row, so a changed figure shows as reworded with its page. If one version stores the table column by column, unchanged cells can appear as moved words, so check the side by side view before trusting a long run of changes there.

How many pages can it compare?

There is no fixed cap. The text of both files is held in this tab's memory, so a contract of a few dozen pages compares in a moment on a laptop. A very long file with thousands of changes takes longer to line up, and when the two versions share almost nothing the result is shown as one replaced block instead.

Does it pick up changes in headers, footers and footnotes?

Yes. Every run of text on the page is read, including running headers, page numbers and footnotes, so a changed date in a footer shows up too. If a document was repaginated, expect a few changes that are only page numbers. They are easy to spot in the list because they sit at the top or bottom of the page.

What does Ignore punctuation do?

It drops full stops, commas, brackets and other marks before lining the words up, so only changes to words and numbers are listed. Use it for a first pass through a heavily edited draft. Turn it off before you sign anything, because a comma or a closing bracket can change which items a clause applies to.

Is the comparison private?

Yes. Both files are read by this page on your device and no network request is made with them, which you can confirm in the network tab of your browser while the comparison runs. Nothing is stored either, so closing the tab clears both files and the list of changes.

Send the agreed version for signature

Take what you made here into e-signatures.

Send a document for signing

More tools like this

Background reading: the question page on this.

Built with pdf.js (Apache-2.0).

Sources

Written and checked by the OneCraft team. Last checked .