Word-level PDF redlining inside your browser tab
Reviewing a revised vendor agreement or board resolution manually risks missing a single altered dollar figure or deleted “not” buried on page 19. By extracting text streams from both documents locally, this browser-based PDF diff builds a word-by-word redline with 0 bytes of contract text sent over the network.
Unlike desktop redlining software that requires paid licenses or server-side document uploads, local comparison runs immediately in any modern tab. Once both files finish extracting, you can scan every inserted or deleted phrase without installing plugins.
Loading Original and Changed version files privately
Drop your baseline file onto Original and your revised file onto Changed version, or drop two PDFs onto the first box to populate both slots together. The reader iterates through every page via pdfjs-dist, preserves explicit end-of-line breaks, and inserts sequential page markers so every change stays anchored to its page.
If you only need to check differences between two plain-text clauses or JSON configs rather than full PDFs, you can compare plain text snippets line by line without exporting documents first.
Reading added highlights, strikethrough removals, and page markers
Once both files finish loading, the results card reports exact +added and −removed counts at the top. Insertions render inside semantic MDN Web Docs HTML ins Element Reference highlights, while deletions render with clear strikethrough formatting so edits stand out immediately.
Each page marker appears inline as a clear divider so legal reviewers can jump straight to the affected clause on page 4 or page 18. Scrolling through the unified diff pane keeps both original wording and revised language visible in one continuous reading column.
How does word-level PDF comparison differ from visual overlay?
Word-level comparison extracts character streams and aligns matching words regardless of line breaks, whereas visual overlay renders pages as bitmaps and flags pixel differences. Legal reviewers prefer word-level diffing for text edits because reflowing a paragraph by two lines will not flood the page with false-positive highlights.
Under the PDF Association ISO 32000-2 Specification, PDF files store text operators separately from layout geometry and raster images. Multi-column PDF layouts can occasionally shift reading order if text blocks were exported out of sequence, so run raw PDF text extraction if you suspect column-order discrepancies.
| Comparison criterion | Word-level text diff | Visual pixel overlay |
|---|---|---|
| Primary input | Extracted PDF text tokens | Rasterized page bitmaps |
| Reflowed line wraps | Ignored cleanly | Triggers full-block false alarms |
| Scanned image PDFs | Requires OCR text layer first | Works directly without OCR |
| Wet-ink signatures and seals | Not detected | Highlighted as pixel changes |
| Best use case | Contract clause and number edits | Final executed scan verification |
Longest common subsequence limits and Only show changes filtering
Aligning thousands of words in a browser requires bounded memory and readable output filtering so long agreements remain fast to inspect. Trimming identical leading and trailing tokens first shrinks the matrix before dynamic programming begins.
Understanding the 4,000,000-cell LCS table threshold
After trimming identical leading and trailing tokens, the diff engine computes a Longest Common Subsequence table capped at 4,000,000 cells, allocating roughly 16 MB in a typed array. If two huge documents exceed that matrix cap or share zero word-level matches, the engine falls back to line-by-line comparison to keep the browser responsive.
Consecutive whitespace between two adjacent additions or two adjacent deletions is merged automatically so multi-word clauses read as a single coherent edit. Deletions are wrapped using the MDN Web Docs HTML del Element Reference pattern with muted strikethrough styling.
Collapsing unchanged paragraphs with 12-token context windows
With Only show changes enabled by default, unchanged passages exceeding 48 word and whitespace tokens collapse into compact dividers. Each divider keeps 12 tokens of unchanged text before and after the gap while surfacing the page number, and once finalized you can apply PDF Bates numbering for formal production.
Filtering out identical boilerplate turns a 60-page master services agreement into a focused checklist of actual edits. Reviewers spend their time verifying altered liability caps, payment windows, and termination notices rather than re-reading unchanged recitals.
Handling scanned contracts and layout-only revisions
Knowing what a text diff cannot see prevents blind spots during final document sign-off. Whenever two versions look identical visually but differ in underlying encoding, checking the text layer resolves the mystery quickly.
Running OCR before comparing image-only scans
As noted in the Library of Congress PDF Format Description, scanned image PDFs lack character streams until optical character recognition runs. If neither file holds extractable text, the tool halts with an error so you can add a searchable text layer to scanned contracts before comparing them.
Why font, margin, and signature edits stay invisible
Because the engine evaluates extracted words and collapses extra spaces, changing a typeface, shifting margins, or adding a handwritten signature image produces zero diff entries. When you need to audit visual stamps or wet-ink initials on an executed signature page, inspect both pages side by side in a viewer.
Keeping text comparison separate from pixel rendering also ensures that two copies exported from different operating systems match cleanly. Minor font-hinting differences between macOS and Windows never clutter your contract review with phantom edits.
Tip: Uncheck Only show changes whenever you need to verify surrounding boilerplate clauses in full context, or click Compare others to clear both documents from memory and start a fresh check.