PDF Text Diff — Compare the Words
Add two PDFs and see what the text actually says differently. The text layer of each is extracted, aligned with a longest-common-subsequence diff, and reported as added and removed lines — plus a .diff file you can attach to a review.
Drop exactly two PDFs here
First file = original · second = revised
Need test files? The sample library has multi-page PDFs you can edit and compare.
How the comparison works
Both documents' text layers are read and grouped into visual lines, then the two sequences are aligned with a longest-common-subsequence diff — the same algorithm behind git diff. Unchanged lines are matched up and skipped, so what you see is only the real edits plus the context lines you asked for.
Word granularity splits every line into words before diffing. That is the right setting when a paragraph was rewritten and a line diff would just show the whole paragraph as removed and re-added; it costs more time on long documents.
Reading the output
- Red lines starting with
-are in the first file only. - Green lines starting with
+are in the second file only. @@ …marks a stretch of unchanged text that was skipped.- The downloadable
.difffile carries the same content in unified form, ready for a code review tool or an email.
Its blind spots
A text diff sees words, not appearance. It will not notice a changed logo, a different font, altered spacing, a moved table, or a new colour — for any of that, use PDF compare, which diffs the rendered pixels. It also cannot read a scan: with no text layer there is nothing to compare, so OCR first.
Reading order is another caveat. Multi-column pages are read in the order the PDF stores the text, which is usually column by column but occasionally interleaved — the diff then shows differences that are really ordering artefacts.
FAQ
Line or word granularity?
Start with lines: the output is compact and easy to scan. Switch to words when a paragraph was reworded and the line diff shows the whole thing replaced — word mode pinpoints the changed phrases.
Why does it report differences in identical documents?
Usually whitespace or reading order. Leave Whitespace: normalise on so runs of spaces collapse. If differences persist, the two files store their text in a different order — common after a re-export from a different tool.
Can it compare a scan?
Not directly — a scan has no text layer. Run OCR on it first; note that OCR errors will then show up as differences.
Is there a size limit?
The exact diff is quadratic, so very large documents fall back to a straightforward line-by-line comparison automatically (above roughly 4 million line pairs). The result is still useful, just less cleverly aligned.
Are the files uploaded?
No. Extraction and diffing both happen in your browser.
Related tools
- PDF visual compare — pixel differences, page by page
- PDF to Text — extract the text yourself
- PDF word count — quick check that a text layer exists
- OCR PDF — add text to a scan
- Search in PDF — find one phrase instead of everything