PDF

Compare Text Differences Between Two PDFs

Compare the text of two PDFs page by page and line by line in your browser, see which lines were removed or added, and save the report as a .txt file.

Runs locally in your browser

What it does

Compare PDF Text reads the selectable text of two PDFs and matches pages by position: page 1 with page 1, page 2 with page 2. Inside each page it compares line by line, so an inserted line does not mark the rest of the page as changed. Lines found only in the first file start with a minus sign, lines only in the second with a plus sign. Both files are read locally.

How to use it

  1. Choose exactly two PDF files, with the original first; use the up and down arrows in the file list to swap them.
  2. Press "Compare".
  3. Read the report under Results and press "Copy" to copy it or "Download" to save comparison.txt.

Example

Input
contract-v1.pdf and contract-v2.pdf (3 pages each, one payment term changed on page 2)
Output
comparison.txt with a "Page 2:" section holding the old line after "- " and the new line after "+ ", ending with "1 of 3 pages differ."

What happens to your file

  • Your file or text is processed by code running in this browser tab. It is not uploaded to any server.
  • The processing code is downloaded from this site with the page; nothing about your input is sent back.
  • The result is created on your device and saved only when you choose to download it.

Limits

  • Exactly two PDF files are compared at a time; lines only in the first are marked "- " and lines only in the second "+ ".
  • Pages are matched by position, so an added or removed page makes the following pages show as different.
  • Changes are shown per line, not per word.
  • On very long pages (roughly 2,000 lines each or more), lines are compared by position instead of line by line.
  • Only extracted text is compared, not layout or images; scanned pages without a text layer have no text to compare.
  • Password-protected PDFs are refused until they are unlocked.

Questions

How detailed is the comparison?

Line by line within each page. Unchanged lines are left out; each changed page lists the lines found only in the first file after "- " and those found only in the second after "+ ". Words are not highlighted, so a line with one changed word appears once with "- " and once with "+ ".

What if a page was added or removed?

Pages are matched by position, so an inserted or deleted page shifts the pages after it and those pages are reported as different. Pages that exist only in the longer file are listed in full.

What does the last line of the report mean?

It reads "N of M pages differ.", where M is the page count of the longer file, or "No text differences found." when the text of every page matches. The report starts with both file names and their page counts.

Is the report saved as a file?

Yes, as comparison.txt. It is also shown on the page with a "Copy" button; nothing downloads until you press "Download".

Can I compare a scanned PDF?

Only if it already has selectable text. For scanned pages, run OCR Scanned PDF on each file and compare the two recognised texts in Diff Checker.

What if I add more than two files or a locked PDF?

The comparison needs exactly two PDFs; with more, the job stops with a message. A password-protected PDF is refused with a message asking you to unlock it first; use Unlock PDF, then compare the unlocked copy.

Next steps