ImagePDF.Tools

Compare Two PDFs and See Every Changed Word

Processing securely on your device, no data sent to any server
PDF

or drop files here

Put the version you sent next to the version that came back. Struck words get a red box, new ones a green box, and both drafts are read inside this tab instead of on a stranger's server.

How it works

Two versions in, every edit out.

Drop the two versions

Original goes in first, revision second. The comparison starts as soon as both are in, page against matching page.

Read the red and green

Amber chips mark edited pages, green chips new pages, red chips missing ones. Open any page to see the boxed words and a plain list of what became what.

Keep a marked-up copy

Save the revised PDF with every new or reworded word under a green highlighter stroke, ready to send back with your questions.

Use cases

Whenever a draft comes back changed.

Reading two long documents side by side with a ruler is slow and unreliable. Letting the words line themselves up takes seconds and does not get tired on page forty.

A contract that came back "clean"

The other side says they only changed the payment terms. Compare their copy with the one you sent and see whether a liability cap or notice period quietly moved as well.

Lease renewals

Landlords often reissue last year's lease with a new date. A word-level check shows whether rent, deposit, pet or break clauses were edited before you sign it again.

Printer proofs against the final file

Before approving a brochure or book proof, compare it with the file you supplied. Typesetting slips such as a dropped line or a doubled word stand out immediately.

Updated terms and policies

When a supplier, insurer or software vendor sends "revised terms", put the old PDF beside the new one and read only the sentences that actually changed.

Revised quotes and tenders

A second quote that looks identical can hide a new exclusion or a changed quantity. Red and green boxes on the figures make the difference hard to miss.

Paper and thesis revisions

Show a supervisor or journal reviewer exactly what was rewritten between drafts by sending the highlighted copy along with your response letter.

How the words get lined up.

A PDF does not store sentences. It stores short runs of characters, each with a position on the page. The tool asks pdf.js for those runs, sorts them top to bottom and left to right, and splits them on spaces into a plain list of words, remembering where each word sits so it can be boxed later. Sideways text, such as a vertical label in the margin, is skipped.

The two lists for a page are then aligned with Myers' O(ND) diff, published by Eugene Myers in 1986 and still the default inside git. It finds the smallest number of word insertions and deletions that turn the old page into the new one, and it stays fast when the pages are long but the edits are few, which is exactly the shape of most revisions.

A removal followed directly by an addition is listed as a replacement, old wording then new. Because pages are paired by number, an inserted page throws off everything after it, and pages laid out in two columns are read row by row across both, so a long edit in one column can make a few lines in the other look changed too.

Remember that this is a comparison of words. Anything that is only drawn, from a swapped photo to a clause turned red, is invisible to it.

Worked example

Original, clause 4.2

The tenant shall pay $1,200 on the first day of each month.

Revised, clause 4.2

The tenant shall pay $1,350 on the fifth day of each calendar month.

Change list: $1,200 → $1,350, first → fifth, and calendar added. Ten words are shared by both versions, so two get a red box and three get a green one.

Between the two versionsDetected?
A word, number or name rewordedYes, boxed on both sides
Text added or removed, even a single commaYes
Capitalisation changes ("Seller" to "seller")Yes
A whole page added or removed at the endYes, page chip turns green or red
A paragraph moved elsewhere on the pageShown as removed here, added there
Bold, italics, font or colour changesNo
Pictures, logos, charts or signatures swappedNo
Same words, different line breaksNo, reported as unchanged
Scanned pages without a text layerNo, run OCR first
Common questions

Questions answered.

Which file should I add first?
Add the older version first and the newer one second. Words that disappeared are boxed in red on the first file, and words that appeared are boxed in green on the second. If you add them the other way round, the colours swap and the saved copy highlights the wrong document.
Does it notice formatting, images or colour changes?
No. The tool compares the words in the text layer and nothing else. A sentence switched to bold, a logo swapped, a table recoloured or a photo replaced will all report as unchanged if the wording stayed the same. For a visual check, flip between the two page previews yourself.
Why do two scanned PDFs say there are no differences?
A scan is a picture of a page with no machine-readable words in it, so both sides come back empty and empty matches empty. Run each file through OCR PDF first to add a text layer, then compare the OCR results. Expect a few false changes where the OCR misread a character differently in each scan.
A page was inserted and now every later page shows as changed. Why?
Pages are paired by position: page 4 of the original is compared with page 4 of the revision, and so on. One inserted page pushes every following page out of step by one. Remove or move that page with Organize PDF so the two files line up again, compare, and look at the inserted page on its own.
What is in the PDF I save?
It is the revised file with a translucent green box drawn over every added or reworded word, including all the words on any brand new pages. The boxes are part of the page drawing rather than comments, and the text underneath stays selectable. Removed words cannot be shown there because they no longer exist in that file, so read those in the on-screen list.
Why is the save button greyed out?
Saving needs at least one added or changed word to highlight in the revised file. If the only edits were deletions, or the files match word for word, there is nothing to mark on the second document. The red boxes and the list of changes are still shown on screen.
Are capital letters and punctuation compared too?
Yes. Words are matched exactly, so "Buyer" and "buyer" differ, and "30" differs from "30," because the comma travels with the word. That strictness is what you want for contracts and figures, though a reflowed sentence with one comma moved will show two small changes.
How does it decide what changed?
Each page becomes a list of words, and the Myers diff algorithm (the same one git uses to show code changes) finds the shortest set of insertions and deletions that turns one list into the other. A paragraph that was moved rather than edited therefore appears as removed in one spot and added in another.
Do my two documents get sent anywhere?
No. pdf.js reads the words and renders the previews inside this browser tab, and the highlighted copy is drawn by pdf-lib in a Web Worker on your own machine. Draft contracts and unreleased reports can be compared without a copy existing anywhere else.