← All tools | 🔍 PDF Diff
ℹ️ 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
How to use
  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 diff runs 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

Note: Works with digital PDFs only — scanned PDFs with no text layer cannot be diffed.

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.

What is "line-level" diffing?

PDF.js extracts individual text items. The tool groups items that share the same Y coordinate into logical lines, then diffs those lines — giving a word-processor-style view.

What if the page counts differ?

Pages only in the revised PDF are marked "New page" (green border). Pages only in the original are "Removed page" (red border).

How to Compare Two PDF Documents

  1. Upload the original (before) PDF using the left upload area and the revised (after) PDF using the right upload area.
  2. Click Compare PDFs — text is extracted from every page of both documents and run through a line-level diff algorithm.
  3. Review the highlighted differences: green marks text added in the revised version, red marks text removed from the original. Both colours appear in context so you can see what changed and where.
  4. Use the page navigator to step through all changed pages in sequence. Pages with no differences are skipped automatically.

Why use LovelyPDF

Both documents are compared entirely inside your browser — no files are uploaded and no text is sent to any external service. This is important when comparing confidential contracts, legal amendments, or internal policy documents where the content must not leave your device during the comparison process.

No account is required. The comparison engine, diff highlighting, and page navigator are all available without sign-up. Compare a two-page amendment or a 200-page policy document with the same tool and the same privacy guarantee — there is no page limit.

The comparison tool works on any device with a modern browser. Compare two versions of a contract on your phone while reviewing a draft, or run a quick audit of a regulatory document update on your laptop. The side-by-side diff view adapts to any screen size.

Frequently Asked Questions

What types of differences does the tool detect? +

The tool compares extracted text content line by line — additions, deletions, and modified lines are all highlighted. It does not detect changes to images, formatting, fonts, colours, or layout. Only textual content differences appear in the results. For visual or design-level changes between PDF versions, a side-by-side visual review is still needed.

Will it work on scanned PDFs? +

The comparison requires a text layer in both PDFs. Scanned documents without OCR contain no selectable text and the tool will show no differences even if the visual content differs. Use the OCR PDF tool to add a text layer to each scanned document before running the comparison.

Can I compare PDFs with different page counts? +

Yes — the tool compares page by page up to the length of the longer document. Pages that exist in one document but not the other show all their lines as added (if new) or deleted (if removed). If the document structure changed significantly between versions — pages inserted or removed in the middle — the per-page comparison may show large blocks of changes that are positional rather than content-based.

Some lines look identical but are flagged as changed — why? +

Lines that appear visually identical may differ in whitespace, Unicode character variants, soft hyphens, ligatures, or invisible formatting codes embedded in the PDF text layer. These micro-differences are detected by the text extraction layer even when the rendered output looks the same on screen. This is a property of the PDF format rather than a tool limitation.