Compare Two PDFs

See exactly what changed between two versions of a document.

Runs in your browser Free · no account

Loading the comparison…

About the Compare Two PDFs converter

Drop in two versions of a document and it shows you what changed: which lines were added, which were taken out, and which were edited, marked on the pages themselves.

Neither file is uploaded. Both are opened and rendered inside your browser, which matters more here than almost anywhere else on this site — the documents people most need to compare are contracts, agreements and drafts under confidence, and those are precisely the files that should not be posted to a stranger's server for processing.

Why subtracting one page from the other does not work

The obvious way to compare two pages is to overlay them and highlight the pixels that differ. It works for exactly one kind of change: one that alters nothing's position. Insert a single sentence into the second paragraph of a contract and every line below it moves down by its own height — so a pixel comparison reports that the whole remainder of the page has changed. That is perfectly true and completely useless.

This is why general image comparison tools are no help with documents, and why the honest thing to do is show it. There is a switch on the page that turns the pixel comparison on so you can watch it fail.

What it does instead

It does what a text diff does, but on pictures. Each page is cut into horizontal bands of ink — lines of text, near enough — and each band is reduced to a fingerprint describing where its ink falls across the width of the page. The two sequences of fingerprints are then matched using the longest-common-subsequence algorithm, the same one the `diff` command has used since the 1970s.

Lines that survive the match are unchanged, wherever they have ended up. What is left over is insertions and deletions. A deletion sitting immediately beside an insertion of something similar is almost always one line that was edited rather than two unrelated events, so those are paired and reported as an edit — and only at that point is anything compared closely enough to box the individual words that moved.

Comparing pictures beats comparing text

It would be easier to pull the text out of both PDFs and diff that, and it would miss most of what people actually need to catch. A figure that changed, a signature block that moved, a table whose column widths shifted, a logo swapped for another — none of that is in the text layer. Nor is a scanned page, which has no text layer at all.

Working from the rendered page means all of it compares the same way, because all of it is ink on paper as far as this is concerned. It also means the comparison is honest about layout: a paragraph that reflowed onto a different page is visible as such, rather than silently matching because the words did not change.

The limitation, stated plainly

The other side of working from the picture is that it sees what a page looks like, not what it says. A change that alters the words without moving any ink would be missed — swapping a font for a different one of identical metrics, for instance. In practice documents do not change that way, but it is worth knowing where the method stops.

It also means the fingerprints depend on both documents being rendered at the same width, which is handled, and on the two documents using broadly the same page size. Comparing an A4 draft against the same text laid out on US Letter will find real differences everywhere, because there genuinely are some.

Reading the result

Red on the left is text that was in the original and is not in the new version. Green on the right is text that is new. An edited line is marked on both sides, with tighter boxes around the parts of the line that actually differ rather than the whole line — so a single altered number in a payment term is visible as a single altered number.

Pages are listed underneath with a one-line summary each, and the buttons step you to the next page that differs, so a two hundred page agreement with three changes in it takes three clicks to review rather than two hundred.

It is not a redline in the legal sense — it does not produce tracked changes you can accept or reject, and it makes no claim about which version is authoritative. What it gives you is the thing a redline is usually wanted for: a reliable answer to where, exactly, the two differ.

Comparing plain text instead

The text mode runs the same matching on two blocks of text you paste in, and returns a conventional diff with lines marked as added or removed. That is useful on its own, and it is the clearest way to see what the visual comparison is doing to lines of ink.

Whitespace can be ignored, which matters when one version has been reformatted or re-wrapped and you only care whether the words changed.

Frequently asked questions

Are my documents uploaded?

No. Both PDFs are opened and rendered inside your browser and nothing is sent anywhere. This is the main reason the tool exists in this form — the documents worth comparing are usually the ones you are least free to hand to a third party.

Does it work on scanned documents?

Yes, and that is a real advantage of comparing the rendered pages rather than the text. A scan has no text layer at all, so text-based comparison has nothing to work with, while this treats it the same as any other page.

What about changes to images, tables or signatures?

They are caught, because the comparison works on what is actually on the page. A changed chart, a moved signature block or a table whose columns shifted all show up, none of which appear in a text comparison.

How many pages can it handle?

The first hundred and twenty of each document. Beyond that the rendering takes long enough to feel broken, and it says so rather than appearing to hang.

Why is a page marked as changed when it looks the same?

Usually because text reflowed onto it from an earlier page, which really is a change to that page. The next-change buttons will take you to the first page where something differs, which is generally where the edit was made.

Can it compare a PDF against a Word document?

Not directly. Export the Word document to PDF first and compare the two PDFs, or paste both as plain text into the text mode if only the words matter.