Skip to content
BabaPDF
Learn

How to compare two PDFs

4 min readHow to

To compare two PDFs, extract the text of both and diff it line by line: added lines show in green, removed lines in red, with a count of each. It compares what the words say, not how the pages look, so both files need a real text layer.

To compare two PDFs, open Compare PDF, drop the original on the left and the changed version on the right, and click Compare — free, without a signup, and in your browser with neither file uploaded. It pulls the text out of both and diffs it line by line, so what changed in the wording stands out instead of being hunted for.

Two dark charcoal document sheets side by side on a pale cool grey-white background, each with a folded top corner and three bright lime horizontal bars stacked down its middle, the two sheets nearly mirroring each other
The text of each PDF is extracted and diffed line by line — the same kind of diff that powers code review.

How to do it

  1. Open Compare PDF

    Go to Compare PDF. It runs on your device — no account, no install, nothing to upload.

  2. Add both versions

    Drop the original PDF on the left and the changed one on the right. Both need a real text layer, so a scan has to be run through OCR PDF first and a password-protected file has to be unlocked first.

  3. Compare and read the result

    Click Compare PDFs. The text of each is extracted and the two are diffed: added lines are marked in green, removed lines in red, unchanged text is dimmed, and a line above says how many lines were added and removed and how many pages each file has.

Compare PDFFind the text differences between two PDF files, side by side.

Is there a way to compare two PDFs for differences?

Yes, and here it means text differences. Compare PDF reads the text layer of both files with pdf.js, then runs a line-by-line diff — the same kind that powers code review — over the two. Lines that were added, removed or edited are highlighted inline, with a count of each. It finds what the words say changed, not how the pages look.

Does Adobe have a PDF comparison tool?

Yes. Acrobat Pro has a Compare Files feature that overlays two versions and flags changes in text and, unlike this tool, in images and formatting too. The trade is that it is paid desktop software that opens your file, whereas Compare PDF is free, needs no account, and diffs the text of both files without either one leaving your browser.

How can I view two PDFs side by side?

This tool does not lay the two pages out side by side to eyeball. It merges them into one diff instead: the shared text stays put, and each change shows in place as a green addition or a red removal, so you read a single marked-up column rather than scanning two pages for what moved. For a true side-by-side of the pages themselves, open both in your PDF viewer’s two-page view.

How can I compare PDF files for free?

Open Compare PDF, add both files, and click Compare — there is no account, no watermark and no upload. The comparison tools above this in the results are mostly free at the point of use in the sense that they open your two documents on their servers to diff them. This one diffs them in the browser tab, so two confidential contracts stay on your machine.

Can it compare scanned PDFs?

No — a scan has no text to compare. The tool diffs the text layer, and a scanned page is a photograph with none underneath, so it stops and names the file rather than reporting a page full of changes. Run OCR PDF on the scan first to add a text layer, as in how to make a scanned PDF searchable, then compare.

Because the diff is line by line over the words alone, two quirks are worth knowing before you trust a result. A moved paragraph shows as a removal in its old place and an addition in its new one, even though not a character of it changed — the lines are simply in different positions. And two PDFs that look completely different but read the same report no differences at all: a new font, recoloured headings or a shifted layout are invisible to a text diff. If you need to catch those, this is the wrong tool; if what you care about is the wording of a contract or a spec, it is exactly the right one. Each file is named in any error — “Original PDF” or “Changed PDF” — so you always know which one to fix.

Keep reading