Compare PDFs

See which words changed between two versions of a document, without either file leaving your machine.

Runs on your devicePDFWorkingNo account needed

What this tool does

Compare PDFs takes exactly two documents and reads them both inside this browser tab, so neither is uploaded and no part of either file is sent anywhere to be processed. The text of every page is pulled out with pdf.js, and the two page lists are handed to jsdiff: page one against page one, page two against page two, and onward to the end of the longer document. Both libraries are served from this site rather than a third party, and once they have loaded the comparison itself makes no further requests. Pages whose text matches are skipped entirely, and the rest are recorded as a run of unchanged, added and removed fragments.

Compare by sets how fine that comparison is. Words is the default and marks individual insertions and deletions inside a sentence, which is what you want when a clause has been quietly retouched. Lines treats a whole line as the unit, so a reflowed paragraph reads as one replaced block instead of a scatter of tiny edits. Ignore whitespace differences is on by default and collapses runs of spaces and tabs before anything is compared, so a re-exported file does not report a change on every line; Ignore capitalisation is off, because a change of case is usually a real edit rather than noise. Both switches rewrite the text before the comparison runs rather than teaching the comparison to overlook things, so with Ignore capitalisation on the report comes back in lower case throughout.

What comes back is a plain text report named after both inputs — statement-v1-vs-statement-v2.diff.txt — carrying a --- Page 4 --- header for each page that differs and every changed fragment prefixed with a plus or a minus. The result screen shows the counts beside it: how many pages each file held, how many of them differ, and the number of characters added and removed. When the extracted text of the two files matches there is nothing to write, and because the workspace expects a file back, an all-clear arrives as a “The tool produced no output” notice over the unchanged queue instead of a result screen saying the versions agree. That is an awkward way to deliver good news, and it is the roughest edge the tool still has.

Two limits decide whether this is the right tool for the job. It compares text and only text, so a document whose wording is untouched but whose logo, table rules, colours, fonts or margins have moved is reported as identical, and a scan, which carries no text layer at all, compares as identical to any other scan for exactly the same reason. The pairing is also positional rather than clever: insert a page near the front of the second version and every page after it is measured against the wrong original, turning a single edit into a document that appears to differ everywhere.

How to use it

  1. Add exactly two PDFs. The older version first and the newer one second, since the first file is the baseline — removals are what left it, additions are what the second gained. A queue holding one PDF is turned back with a request for two, and a queue of three or more is refused with the number it counted rather than a guess at which pair you meant.
  2. Choose words or lines. Words marks the edits inside a sentence. Lines treats each line as a unit and is the steadier choice when a paragraph has reflowed and every line break has moved with it.
  3. Decide what to ignore. Ignore whitespace differences starts on, so respacing and re-export noise does not swamp the result. Switch Ignore capitalisation on when a house-style change of case is not what you are hunting for, remembering that it folds the text first and the saved report is lower-cased as a result.
  4. Read the counts, then open the report. The summary names how many pages differ and how many characters were added and removed. The .diff.txt file lists each of those pages with plus and minus lines you can read, grep or paste into a ticket.

Processing & privacy

Runs on your device. Your file is processed directly in this browser.

Common use cases

Checking document changes in a returned contract

The other side sends a revised PDF back with no tracked changes in it. A word-level pass names the clauses that moved instead of leaving you to reread thirty pages hoping to spot them.

Confirming a re-export is clean

After a template edit or a font substitution, comparing the old build with the new one tells you whether any wording shifted as well as the layout you were actually changing.

Auditing a policy or terms update

Published documents rarely ship a changelog. Setting last quarter's file against this quarter's produces one, page by page, in a form you can circulate.

Verifying a corrected invoice

Line mode makes an altered figure or a shifted total obvious on the one page it sits on, and leaves every untouched page out of the report entirely.

Questions

Is either PDF uploaded?
No. Both documents are read from disk into this browser tab and compared on your own processor. Nothing about them is transmitted, logged or stored; the only things the page fetches are its own copies of pdf.js and the diff library, both served from this site.
Can I compare more than two files at once?
No. The comparison is between a pair, so a queue holding three or more PDFs is refused and the message says how many it found. Work through the versions two at a time instead.
What happens when the two versions turn out to be identical?
There is no report to write, and the workspace treats a run that produced no file as a failed one, so you get a “The tool produced no output” notice and the queue stays as it was. Nothing has gone wrong: that message is how this tool currently tells you the extracted text matched.
Why does it say the documents match when they plainly look different?
Only the extracted text is compared. Fonts, colours, images, table rules, spacing and page furniture are all invisible to it, so a redesign that keeps the same wording gives the comparison nothing to report at all.
Why does every page after page three differ?
Pages are matched by position, not by content, so a page inserted or removed in the second version knocks everything after it out of step and each one is compared against the wrong original. Line the two documents up first — Delete Pages or Extract Pages will do it — then run the comparison again.
Does it work on scanned documents?
No. A scan is a picture of a page and holds no text layer, so nothing is extracted from either file and two entirely different scans compare as identical. Run each one through PDF OCR first, then compare the results.
Can it read a password-protected PDF?
No. The renderer refuses an encrypted document and the message names the file that stopped it. Remove the password with Unlock PDF, using the one you already hold, then compare the result.
What exactly is in the file I download?
A plain text report. Each page that differs gets a header line, followed by the fragments that changed — additions prefixed with a plus, removals with a minus. Pages that matched are left out, so the report is only as long as the edits are.

Related tools

  • Merge PDF — Combine several PDFs into one document in the order you choose.
  • Split PDF — Split one PDF into separate documents by page range.
  • Compress PDF — Reduce PDF file size while preserving the quality that matters.
  • PDF to JPG — Export every page of a PDF as a JPG image.
  • JPG to PDF — Turn one or many JPG photos into a single PDF.
  • Protect PDF — Add a password and set permissions on a PDF.