PDF Diff
Upload two versions of a PDF and see exactly what changed — added lines in green, removed lines in red, page by page.
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
- Upload the original (before) PDF and the revised (after) PDF
- Click Compare PDFs — text is extracted from every page of both documents
- An LCS (Longest Common Subsequence) diff is run on the text lines of each page
- Green highlights appear over added lines, red over removed lines
- Use the page navigator to step through all changed pages
- 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