How to compare two PDF files
Last updated: September 6, 2026
A contract comes back 'final'. A report gets a 'small revision'. The only way to know what actually changed is to compare the two versions, and scanning them side by side in two windows is slow and unreliable past page five. Here's how to get a real diff.
Use our free Compare PDF tool. It runs in your browser.
Running the comparison
- Open the Compare PDF tool.
- Choose the original first, then the revised version. The order sets which side counts as "before".
- The text of both files is extracted and diffed page by page, entirely inside your browser.
- Download the plain-text report: lines removed from the original are marked
-, lines added in the revision are marked+, grouped page by page.
Making sense of the report
The output is a single plain-text (.txt) file, which means you can open it anywhere and paste it into an email without formatting surprises. It opens with a short summary of the two page counts, then walks through the document one page at a time, listing only the lines that differ. A line present solely in the original is prefixed with -; a line present solely in the revised version is prefixed with +. A changed sentence therefore shows up as both: the old wording removed and the new wording added, right next to each other. When the two files have different lengths, the extra pages beyond the shorter file are flagged as added or removed pages, often the quickest way to see exactly where a section was inserted or cut.
What a text diff catches, and what it misses
Because the comparison works on extracted text, it is precise about wording. A reworded clause, a deleted paragraph, a changed figure typed into the document, a swapped name: all surface clearly. What it cannot see is anything that isn't text: a replaced image, a shifted logo, a change of font or colour, or a table redrawn with the same words in a different layout. It also treats text that has merely moved to another page, unchanged, as an addition on one page and a removal on another. When the diff comes back clean but you still suspect a visual edit, open the two files side by side to confirm.
Where a page-by-page diff pays off
A lawyer receiving a contract back marked "minor changes" can confirm in seconds whether the counterparty touched a liability clause or only fixed a typo. An editor comparing manuscript drafts can see precisely which paragraphs an author revised between rounds. And an operations team can check that a reissued policy or terms document differs from the prior version only where it claims to, with no quiet edits slipped in elsewhere.
How the diff is produced
The tool first extracts the text layer from each PDF, page by page, turning every page into a sequence of lines. It then runs a line-by-line difference algorithm (the same kind of comparison used for source code), matching lines that are unchanged and isolating those that were added or removed. Working per page keeps the results aligned with the document you are reading, so a difference is reported against the page it appears on rather than as one long undifferentiated stream.
Getting the direction right
The first file you pick is treated as the original and the second as the revision. If you load them the wrong way round, the report still contains exactly the same differences; only the + and - markers are swapped. To read it the intended way, reorder the two files before comparing.
Frequently asked questions
Does it detect image or layout changes? No. This is a text comparison; a swapped picture or a re-styled page with the same words shows no difference. Use a side-by-side visual check for those.
Will it work on scanned PDFs? Only if the scan has a text layer. A pure image scan has no extractable text, so run it through OCR first to make the words readable.
What format is the report? A plain-text file with a page-count summary followed by the differing lines, marked + and -, for each page.
Can it compare more than two files? It compares two at a time. To track changes across several versions, compare them in pairs.
Comparing drafts without uploading them
The documents people most often need to compare (contracts under negotiation, unreleased reports, legal drafts) are exactly the ones that should not be handed to an outside server. This tool reads and diffs both files inside your browser, so two confidential versions can be compared without either one leaving your machine. For the general question of trusting online tools, see are online PDF tools safe? Related tools: PDF Metadata to check what each version reveals, and Merge PDF to assemble the approved final.