CodeKitHub
PDF Tools

Compare PDF Files Online

Last updated:

Compare two PDF documents and see exactly what changed, page by page. Upload file A and file B, click Compare, and each page is matched up and diffed — additions highlighted in green, removals in red — with a summary of how many pages differ. Everything runs locally in your browser, so neither file is ever uploaded anywhere.

PDFs are compared locally in your browser — never uploaded to any server.

What Is This Tool?

A PDF comparison tool takes two versions of a document — say, a contract before and after redlining, or two drafts of a report — and shows you what's different between them without you having to read both side by side line by line.

This tool works by text-content comparison: it uses pdf.js to extract the text from every page of each PDF (per the ISO 32000 PDF specification each page stores its text as positioned runs, which pdf.js reads back out in reading order), then runs a word-level diff between the text of matching pages. It tells you exactly which words were added or removed.

It's important to be upfront about what this does and doesn't catch: this is a text-content diff, not a pixel-level visual diff. It will reliably catch changed wording, added or deleted sentences, and reflowed paragraphs. It will not detect purely visual or layout-only changes — a font swap, a color change, a shifted image, or a re-arranged page that keeps the exact same words. If you need to confirm a document is pixel-identical to another, this tool isn't the right one; if you need to know whether the wording changed, it is.

Why Use It?

  • See changes at a glance — added and removed text is color-highlighted per page instead of you eyeballing two documents.
  • Page-count summary up front: how many pages are in file A, how many in file B, and how many pages actually differ.
  • Handles PDFs with a different page count — pages that only exist in one file are called out rather than silently skipped.
  • Private by design: contracts, drafts, and other sensitive documents never leave your device, since extraction and diffing both happen in your browser tab.
  • Free, with no page limit beyond what your browser can handle, and no account required.

How to Use

  1. Click or drag file A (the original PDF) into the first drop zone.
  2. Click or drag file B (the modified PDF) into the second drop zone.
  3. Click "Compare PDFs" and wait while the text of each page is extracted and diffed.
  4. Read the summary line for the page counts and how many pages differ.
  5. Scroll through the per-page results — green highlights are text added in file B, red strikethrough is text removed from file A, and pages with no highlights are unchanged.

Example

Input

contract-v1.pdf (3 pages) and contract-v2.pdf (3 pages), where the third page had one clause reworded

Output

Summary: "File A: 3 pages, file B: 3 pages — 1 page differs", with page 3 showing the old clause struck through in red and the new wording highlighted in green

Pages 1 and 2 show as identical, so you can jump straight to the one page that actually changed.

When to use PDF Compare vs. Text Diff

Both tools end up running the same kind of word-level diff, but they start from different inputs. Use PDF Compare when you have two actual PDF files — a contract, an invoice, a report — and want the tool to open both, pull out each page's text, and match pages up automatically.

Use the plain Text Diff tool instead when you've already got the content as text — for example, you copy-pasted a clause out of a PDF, or you're comparing two versions of a config file, a script, or an email draft. It's faster for that case since there's no PDF parsing involved, and it works on any pasted text, not just extracted PDF pages.

Text Diff · PDF Merger · PDF Splitter

Common use cases

  • Checking what actually changed between two revisions of a contract or legal agreement before signing.
  • Reviewing edits between draft and final versions of a report, proposal, or academic paper.
  • Confirming an invoice or purchase order matches an earlier version after a vendor sends a revision.
  • Spotting unauthorized or unexpected edits between an original document and a copy someone else has been editing.

Frequently Asked Questions

Does this compare the exact visual layout of the PDFs, or just the text?

Just the text content of each page. It extracts the text pdf.js can read from each page and diffs it word by word. It will not flag a purely visual change — a different font, a recolored heading, a shifted image — if the underlying words are the same. If you need pixel-level visual comparison, that would require rendering both PDFs to images and diffing pixels, which this lightweight browser-based tool doesn't do.

What if the two PDFs have a different number of pages?

Pages are compared by matching position (page 1 of A against page 1 of B, and so on). If one file has more pages than the other, the extra pages are shown as "only present in file A" or "only present in file B" rather than being skipped or causing an error.

Can it compare scanned PDFs or image-only pages?

Only if the PDF has actual text embedded — scanned pages that are just images with no underlying text layer have nothing for pdf.js to extract, so those pages will show as empty. Run the scan through OCR first to add a text layer if you need to compare it this way.

Are my PDFs uploaded anywhere to be compared?

No. Both files are read, their text extracted, and the diff computed entirely in your browser using JavaScript. Neither file is sent to a server — there's nothing to upload.

I already have the text from both documents — do I need this tool?

No — if you've already extracted or copied the text into plain text, use the Text Diff tool directly, since it skips the PDF-parsing step and diffs the text immediately. Use PDF Compare when you have two PDF files themselves and want the page extraction handled for you.

Related Tools