ℹ️ 100% private — both PDFs stay in your browser. Text extraction, diffing, and highlighting all run locally. Nothing is uploaded.
Step 1 — Upload Both PDFs
Original Before
📄
Original PDF
The "before" version
Revised After
📄
Revised PDF
The "after" version
Comparing… 0%
✅ Diff Report Ready
Revised PDF with change highlights baked in
⏱ File expires in 60s
⚠️ File expired. Click Compare again to regenerate.

Compare Two PDF Files Online — See Exactly What Changed

LovelyPDF PDF Diff uses PDF.js to extract text from both documents, runs a line-level diff algorithm locally in your browser, and overlays colour-coded highlights directly on the rendered pages. No file is ever uploaded to a server.

How It Works

  1. Upload the original (before) PDF and the revised (after) PDF
  2. Click Compare PDFs — text is extracted from every page of both documents
  3. An LCS (Longest Common Subsequence) diff is run on the text lines of each page
  4. Green highlights appear over added lines, red over removed lines
  5. Use the page navigator to step through all changed pages
  6. Download a diff report PDF — the revised file with highlights baked in

Frequently Asked Questions

Does this work on scanned PDFs?

No. The tool needs selectable text embedded in the PDF. Scanned PDFs have no text layer so no diff can be produced. If the pages appear empty in the diff, that usually means there is no extractable text.

What is "line-level" diffing?

PDF.js extracts individual text items (short spans). The tool groups items that share the same Y coordinate into logical lines, then diffs those lines. This gives a word-processor-style "what changed" view rather than character-by-character noise.

What if the page counts differ?

Pages that exist only in the revised PDF are marked as "New page" with a green border. Pages that exist only in the original are marked "Removed page" with a red border. All extra pages are included in the page count.

Related tools: Edit & Redact · Redact by Pattern · Compress PDF