PDF Compare

Diff the text layers of two PDFs line by line: added and removed lines are listed, unchanged lines counted, and identical documents reported as such.

PDF Tools Runs in your browser · no upload

Reviewed 17 November 2026 · Free · No account needed

ExecutionYour browserInput never leaves your tab
File retentionNoneNothing is stored
AccountNot requiredNo sign-up, no paywall
PriceFreeNo trial, no usage cap on the tool itself

How to use

  1. Choose the original PDF (version A) and the changed PDF (version B).
  2. Press Compare — both text layers are extracted and diffed with an LCS algorithm.
  3. Read the added (+) and removed (−) lines, with unchanged counts above.

Example

Input: contract-v1.pdf vs contract-v2.pdf

Output: + new clause line, − deleted line, 214 unchanged lines

How it works

Text is extracted from both PDFs with pdf.js and compared line by line. Lines present in only one document are highlighted as additions or removals.

Both documents' text is extracted with pdf.js, split into lines and normalised (whitespace collapsed, blanks dropped). An LCS dynamic-programming diff then walks the two line arrays, marking each line as unchanged, added (+) or removed (−).

Worked example

contract-v1.pdf vs contract-v2.pdf → one '+ new clause' line, one '− deleted' line, 214 unchanged lines.

Edge cases to know

  • Text content only — font, spacing, image and layout changes are invisible to the comparison.
  • Both documents are capped at 4,000 text lines; longer documents are refused rather than partially compared.
  • Identical documents are reported as such when there are no added or removed lines.
  • Scanned PDFs without text layers cannot be compared (no OCR).

Limits & compatibility

  • Compares text content only — fonts, spacing, images and layout changes are invisible.
  • Both documents are capped at 4,000 text lines each.
  • Scanned PDFs without text layers cannot be compared (no OCR).

Privacy

Both files are parsed locally with pdf.js. Neither document is uploaded anywhere.

Related tools

FAQ

Questions about PDF Compare

What exactly does PDF Compare compare?

The text layers of the two documents, line by line. An LCS (longest common subsequence) diff lists every added line with a plus and every removed line with a minus, and counts the unchanged lines above them. Identical documents are reported as such.

Will it catch formatting or layout changes?

No. Fonts, spacing, images and layout are invisible to the comparison — only the extracted words matter. A document whose paragraphs moved but whose text is identical will read as unchanged. For visual differences you would need a page-image comparison instead.

Are there size limits?

Both documents are capped at 4,000 text lines each — longer documents are compared up to that cap. Scanned PDFs cannot be compared at all, because without a text layer there is nothing to diff and no OCR runs here.

Are both of my documents uploaded?

No. Both files are parsed locally with pdf.js and diffed inside your browser; neither document is uploaded anywhere or stored. That makes it workable for comparing contract versions, drafts or reports that confidentiality rules prevent you from uploading to third-party services.