Skip to content
RightYantra
PDF tools

Compare PDF

Put two versions of a document side by side and see exactly what changed: every word added or removed, highlighted in place, with a running count and a button that jumps to the next change. For scans and drawings, switch to a visual overlay that shows what changed on the page itself.

How to use it· 4 steps
  1. Drop the original PDF in the first box and the changed version in the second.
  2. Choose Text to compare the words, or Visual to compare the pages as images.
  3. Press Compare text, then step through the changes with Next change.
  4. Use Find every page that differs in Visual mode to locate changed pages quickly.
Compare PDFRuns on your device

Step by step

How to use the compare pdf

  1. 1Drop the original PDF in the first box and the changed version in the second.
  2. 2Choose Text to compare the words, or Visual to compare the pages as images.
  3. 3Press Compare text, then step through the changes with Next change.
  4. 4Use Find every page that differs in Visual mode to locate changed pages quickly.

When you need to know what changed

A counterparty sends back “the agreed contract, with a couple of small fixes”. A policy is reissued with a new date and, supposedly, nothing else. A supplier's price list arrives as a fresh PDF. In each case the question is the same — what is different from the version I already have — and reading two documents side by side is slow and unreliable, because the eye skips exactly the small changes that matter: a 30 that became a 60, a “shall” that became a “may”, a sentence that quietly disappeared.

These are also documents you would rather not upload. Contract drafts, financial terms and internal policies are compared here entirely in your browser.

How the text comparison works

Both files' text is read with pdf.js and put back into reading order: fragments are grouped into lines by their baseline, lines are ordered top to bottom. The text is then split into words and punctuation marks, so a changed comma shows as a changed comma rather than marking the whole word.

The two word streams are compared as whole documents with Myers' difference algorithm, the method behind most diff tools, which finds the smallest set of insertions and deletions that turns one into the other. Comparing whole documents rather than page against page matters: if one paragraph is added on page 2, everything after it moves down, and a page-by-page comparison would report every later page as different. Here only the new paragraph is reported, and each change still knows which page it is on in each file.

The result shows the original and the changed text side by side, with removed words struck through in red and added words underlined in blue, plus counts of changes and of words added and removed. Next change and Previous step through them and scroll both columns to the spot; the list view gives every change at a glance.

The visual comparison, for scans and drawings

A scanned document has no text to compare, and some changes are not textual at all — a moved logo, a revised drawing, a different signature, a figure swapped for another. Visual mode renders the same page of both files at the same size and compares them pixel by pixel. Ink that is only in the original shows red, ink only in the new version shows blue, and everything unchanged fades to grey, with outlines around each area of change so a tiny edit is easy to spot.

Find every page that differs checks the whole document and lists the pages with any difference, so in a 60-page file you can go straight to the three that changed. Visual comparison works page by position, so it is best for documents with the same page structure — an inserted page shifts everything after it, which the text comparison handles better.

What a comparison will and will not catch

The text comparison compares words. Changes of font, size, colour or bold are not reported, because they do not change the words; the visual comparison shows them. Spacing and line breaks are ignored on purpose, since reflowing a paragraph is not a change of meaning.

Reading order can trip any text comparison on complex layouts. Two-column pages, sidebars and tables are extracted in the order the text sits in the file, which for some producers is not the order on the page, and moved blocks may then show as removed in one place and added in another. Ligatures and hyphenation can occasionally show as tiny changes too.

If a file has no text layer, the tool says so and points to the visual mode or to OCR, which can produce text from a scan first. Treat a clean result as strong evidence rather than proof for anything legally significant, and read the changed passages in full context before you sign.

Answers

Frequently asked questions

Can I compare scanned PDFs?

Yes, with the Visual comparison, which compares the pages as images. Scans have no text for the Text comparison; OCR can produce some first.

Does it compare formatting?

The Text comparison compares words only. Use the Visual comparison to see changes in formatting, images and layout.

What if the PDFs have different page counts?

The Text comparison aligns the whole documents, so inserted or removed pages are reported as the text they contain. The Visual comparison compares pages by position.

Why is moved text shown as removed and added?

A difference algorithm describes a move as a deletion in one place and an insertion in another. Read both together to confirm it is only a move.

Is there a size limit?

No fixed limit — everything runs on your device. Very long documents with many changes take a few seconds longer to compare.

Are my documents uploaded?

No. Both files are read and compared in your browser.