Back to PDF Tools

Compare PDF

Compare two PDF documents side by side

Click or drop PDF 1 hereChoose PDF 1

Click or drop PDF 2 hereChoose PDF 2

About Compare PDF

Compare PDF reads the text of two PDF files and lists the lines that differ: lines found only in the first file are shown in red, lines only in the second in green, and inside a changed line the words that differ are highlighted. Each line carries the number of the page it comes from, and spacing differences are ignored. Both full texts are then shown side by side. It compares text only, not layout, images, or fonts, and a scanned PDF has no text to compare. PDF.js reads both files inside your browser tab.

How to compare two PDF files

  1. 1Click the left box and choose the first PDF, for example the older version.
  2. 2Click the right box and choose the second PDF.
  3. 3Click "Compare PDFs".
  4. 4Read the count of changed lines and the red and green lines with their page numbers, then the two full texts below for context; nothing is downloaded.

Formats and limits

Input
Two PDF files, one in each box
Result
On-screen list of differences and both texts; no file to download
Compared
Text lines, with spacing ignored; layout, pictures, and fonts are not compared
Scanned PDFs
No text to compare: the page says which file has none, or that neither has, and suggests OCR PDF

Where your file is processed

Both PDFs are read in your browser by PDF.js; the files and their text are not uploaded to our servers. If the page shows an error, a cleaned copy of that message, the tool's name, and your browser's name and version are reported to us so it can be fixed; your files and their text are never part of that report.

Frequently asked questions

Does it also show which words changed inside a line?

Yes. A line found only in one file is colored red or green, and when a removed line pairs with an added one, the words that differ inside them are highlighted. Each line also shows the page it comes from, so you can find it in the original document.

Can I compare two scanned PDFs?

No. A scan stores pictures of pages, not text, so there is nothing to compare. With two scans, the page says that neither PDF has text; run both through OCR PDF to get searchable PDFs, then compare those copies instead.

Are changes in spacing reported as differences?

No. Before the comparison, each line is trimmed and runs of spaces are reduced to one, so spacing alone never counts. Text that moved to another line can still appear as one line removed and one line added.

Does it compare formatting, pictures, or layout?

No. Only the text that PDF.js reads from each page is compared. A new font, a moved picture, or a different color with the same words gives no difference, and lines follow the order in which each file stores its text.

Tips and tricks

  • ✓Put the older version in the left box: lines that were removed then show in red, new lines in green.
  • ✓For two scanned versions of a contract, run both through OCR PDF first, then compare the searchable copies.