CLIENT-SIDE COMPARISON

How to Compare Two PDFs for Differences Free Online

Compare two PDF files and highlight every difference between the documents in seconds with this free PDF difference checker. Word-by-word diff, change navigation, and exportable reports -- all running privately in your browser.

100% Private Side-by-Side View Instant Diff
Karan Kumar Updated October 12, 2026 12 min read
In This Guide
Table of Contents
  1. Introduction to PDF Comparison
  2. How PDF Comparison Works
  3. Step-by-Step Comparison Guide
  4. Side-by-Side View
  5. Word-Level Diff
  6. Change Navigation
  7. Page Navigation
  8. Swap Documents
  9. JSON Report Export
  10. When to Use PDF Comparison
  11. Text-Based vs Scanned PDFs
  12. Best Practices for Accurate Comparisons
  13. Online vs Desktop Comparison Tools
  14. Limitations and What to Expect
  15. Privacy and Security
  16. What to Do After Comparing
  17. Key Takeaways
  18. Related Guides
  19. About the Author

01Introduction to PDF Comparison

Two PDFs that look almost identical -- but somewhere between page 3 and page 12, a sentence changed, a number shifted, or a paragraph disappeared.

Finding that one difference manually is like searching for a typo in a phone book. Your eyes glaze over before you spot it. That is exactly why PDF comparison tools exist. They scan both documents, extract every word, run a proper diff algorithm, and show you exactly what changed -- highlighted in green and red so you cannot miss it.

AFFLIGO Compare PDF tool — a free online PDF comparator — loads both documents locally in your browser, extracts text from every page using PDF.js, runs a word-by-word diff using the Longest Common Subsequence (LCS) algorithm, and renders the results in a synchronized side-by-side view. No server uploads. No sign-ups. Files up to 1GB each are accepted, though very large files depend on your device memory. Just open the page and compare.

Whether you are a lawyer checking contract changes, a student comparing draft revisions, an accountant verifying invoice versions, or just someone who needs to find what changed between two versions of a document, this guide covers everything you need to know about comparing PDFs effectively.

02How PDF Comparison Works

Two files, one LCS diff — here is the machinery under the split pane, so a surprising highlight reads as logic, not magic.

Text Extraction with PDF.js

The tool uses PDF.js, a JavaScript library maintained by Mozilla, to parse the raw text content from every page of both PDFs. It reads the embedded text layer directly from the PDF structure, pulling out each word and its position.

Word-by-Word Tokenization

Once text is extracted, it gets broken into individual word tokens. This is more accurate than character-level comparison because it understands word boundaries. The tokenizer normalizes whitespace so minor spacing differences do not create false positives.

LCS Diff Algorithm

The comparison uses the Longest Common Subsequence algorithm -- the same approach used by Git and other professional diff tools. It finds the maximum matching words between documents and flags everything else as added or removed.

Side-by-Side Rendering

Results render in a split view: Document 1 on the left, Document 2 on the right. Added words show in green, removed words in red. Both panes display side by side — scroll each independently, so you always see the same section of both documents.

Why LCS Matters

Professional diff tools like Git use the same Longest Common Subsequence algorithm. By understanding how the comparison works, you can interpret results more accurately -- especially when dealing with documents that have significant reformatting or layout changes that do not affect the actual text content.

Hands-On Tested

I built and tested this comparator on PDF.js + LCS word diff: both files are held in memory together, tokenized word-by-word with whitespace normalized, then rendered in a synchronized split pane (green additions, red removals). Change navigation jumps between contiguous change groups, the swap button reruns the comparison automatically, and the Report button exports a JSON with timestamps, filenames, page counts, and word stats.

03Step-by-Step Comparison Guide

Load both versions, run the LCS diff, and walk the changes — three moves to every difference.

01

Open the Compare PDF Tool

Navigate to affligo.com/compare-documents in your browser. The tool loads instantly with two upload slots side by side: Document 1 (your original or base file) on the left, and Document 2 (the revised or comparison file) on the right. No installation required. Works in Chrome, Firefox, Edge, and Safari.

Compare PDF tool with two upload slots side by side
02

Upload Both PDFs

Click either upload slot or drag and drop a PDF file onto it. You can upload files in any order -- use the swap button between the slots to switch them if needed. The tool displays the filename and file size for each document so you can confirm you uploaded the right files. Both files are held in memory together for word-by-word LCS diff. Uploading the same file twice is the classic false alarm — as shown in Step 2 above, check both filenames first; identical files report zero differences.

Two PDF files uploaded into compare slots
03

Run the Comparison

Once both files are loaded, the Compare button activates. Click it and the tool begins extracting text from both PDFs. For typical documents this takes a few seconds. Larger documents with many pages may take slightly longer. Everything processes locally in your browser — both files sit in memory together for the word-by-word LCS diff, and nothing is transmitted anywhere.

Compare button highlighted in compare PDF tool
04

Review the Differences

The results appear in a side-by-side view. Use the page navigation to move between pages. Use the change navigation buttons to jump directly to the next or previous difference. The stats bar at the top shows total differences, additions, removals, and unchanged words at a glance.

Side-by-side comparison results with highlighted differences
05

Export the Report

Click the Report button to download a JSON file containing detailed comparison statistics: timestamps, filenames, page counts, and word counts for additions, removals, and unchanged content. This is useful for record-keeping, sharing with colleagues, or tracking changes across multiple comparison sessions.

Export report button in compare PDF tool

04Side-by-Side View

Both documents display simultaneously in a synchronized split pane layout.

The side-by-side view is the core of the comparison experience. Document 1 appears on the left, Document 2 on the right. As you scroll through either pane, the other stays perfectly aligned. This means you always see the same paragraph, sentence, or line in both documents at the same time.

Words that were added in Document 2 appear with a green background. Words that were removed from Document 1 appear with a red background and strikethrough. Words that appear in both documents are shown without any highlighting, making it easy to scan for changes.

The synchronized scrolling is especially useful for long documents. Instead of manually flipping back and forth between two PDF viewers, you see both versions at the same time and can instantly spot where they diverge.

05Word-Level Diff

Differences are highlighted at the word level for maximum precision.

Unlike line-level or paragraph-level comparison tools, AFFLIGO compares at the word level. This means even a single changed word in a 50-page document gets flagged. The word-level approach catches subtle modifications that coarser comparison methods would miss entirely.

For example, if a contract clause says "shall pay within 30 days" in the original and "shall pay within 45 days" in the revised version, a line-level tool might show the entire paragraph as changed. The word-level diff highlights only "30" and "45" -- the actual difference.

The tokenizer normalizes whitespace before comparison, so differences in spacing, indentation, and line breaks do not create false positives. You see only meaningful content changes.

06Change Navigation

Jump directly between differences without scrolling through the entire document.

The change navigation controls sit above the comparison results. They show "Change 1 of N" and let you jump to the next or previous difference with a single click. Each change is a contiguous group of added or removed words -- not individual words, which would make navigation tedious.

This is significantly faster than scrolling through a 50-page document looking for the next highlighted word. For documents with many small changes, change navigation lets you review every modification systematically without missing any.

The stats bar also gives you a bird's-eye view: total words compared, additions, removals, and unchanged content. This helps you quickly assess how different the two documents are before diving into the details.

08Swap Documents

Switch Document 1 and Document 2 to see the comparison from the other direction.

The swap button sits between the two upload slots and switches their positions. After swapping, what was added becomes removed and vice versa. The comparison reruns automatically with the documents in their new positions.

This is useful when you want to understand changes from a different perspective. For example, if you compared a draft against a final version and want to see what the final version removed (rather than what the draft added), swapping gives you that view instantly.

09JSON Report Export

Download a detailed report with comparison statistics for record-keeping.

The Report button generates a JSON file containing comprehensive comparison data: timestamps, filenames, page counts, and word counts for additions, removals, and unchanged content. This is useful for:

Record-Keeping

Save a permanent record of what was compared, when, and the exact statistics. Useful for compliance and audit trails.

Team Sharing

Share comparison results with team members who were not involved in the review. The report provides a concise summary without requiring them to re-run the comparison.

Change Tracking

Compare reports from multiple comparison sessions to track how document differences evolve over time across different versions.

10When to Use PDF Comparison

PDF comparison solves real problems across industries and workflows.

Contract Review

Lawyers and business professionals compare contract versions to identify changed clauses, added terms, or removed provisions — a fast first-pass redline review. A single word change in a legal document can completely alter its meaning.

Academic Paper Revision

Students and researchers compare draft versions to see what changed between revisions. Track how arguments evolved, what sections were restructured, and which citations were added or removed.

Invoice Verification

Compare an original invoice against a revised version to spot unauthorized changes to amounts, quantities, or terms. Essential for accounts payable teams processing high volumes of financial documents.

Policy and Compliance

Compare updated policy documents against previous versions to identify exactly what changed. Compliance teams verify that required changes were made and no unauthorized modifications occurred.

Team Collaboration

When multiple people edit a document, comparing versions ensures nothing was accidentally deleted or corrupted. The report export lets you share results with team members remotely.

Version Control

Track document evolution across multiple versions. Compare the latest version against any previous version to understand the complete change history. Especially useful for technical documentation.

Tested while writing this guide: I compared two drafts of a service agreement where the only change was a payment term (Net-30 to Net-15) buried on page 6 — the word-level diff flagged exactly that clause plus two punctuation fixes, ignoring identical pages. A scanned photo-PDF of the same file returned zero comparable text, confirming OCR-first is mandatory for scans.

11Text-Based vs Scanned PDFs

The type of PDF you upload determines how well comparison works.

FeatureText-Based PDFScanned PDF
Text extractionWorks perfectlyRequires OCR first
Word diff accuracyHigh -- every word is detectedLow -- no text layer to compare
Comparison resultsAccurate highlightsMay show no differences
How to identifyCreated from Word, LaTeX, HTML, or digital toolsCreated by scanning paper documents or taking photos
FixNo fix neededUse OCR tool first to add text layer
Important

If your scanned PDF shows no differences, it is likely because the tool cannot extract text from image-only pages. Use an OCR (Optical Character Recognition) tool first to add a text layer, then compare the OCR output.

12Best Practices for Accurate Comparisons

Follow these practices to get the most accurate and useful comparison results.

01

Use Text-Based PDFs

The comparison tool works by extracting embedded text. Text-based PDFs (created from Word, LaTeX, or HTML) produce the best results. Scanned image-only PDFs may not yield usable text without OCR preprocessing.

02

Name Files Clearly

Before comparing, ensure your files have clear names that indicate their version. "Contract_v1.pdf" and "Contract_v2.pdf" are much easier to track than "document (1).pdf". The comparison report includes filenames, so clear naming makes the report immediately useful.

03

Check Page Counts

If one document has significantly more pages than the other, the extra pages will show as entirely added or removed. This is expected behavior. For documents with different page counts, pay attention to where content diverges.

04

Focus on Content, Not Formatting

The tool compares text content, not visual formatting. If a paragraph was reformatted but the words stayed the same, it will not show as a difference. This is usually what you want -- you care about content changes, not cosmetic adjustments.

05

Export Reports for Record-Keeping

Always download the comparison report after reviewing results. The JSON report provides a permanent record of what was compared, when, and the exact statistics. This is invaluable for compliance and audit trails.

13Online vs Desktop Comparison Tools

How browser-based PDF comparison compares to desktop software.

FeatureAFFLIGO (Online)Adobe Acrobat (Desktop)
PriceFreePaid subscription
InstallationNone -- runs in browserDesktop app required
Privacy100% client-side, local onlyFiles processed locally
Diff granularityWord-levelWord-level
Report exportJSON statisticsPDF comparison report
Works onAny device with a browserDesktop only
Batch comparisonTwo files at a timeMultiple files
Scanned PDF supportRequires OCR firstBuilt-in OCR

AFFLIGO is best for quick, private, free comparisons where you do not need to install software or pay for a subscription. Adobe Acrobat offers more features for enterprise workflows but requires a paid plan.

Two more names you will meet: Draftable compares documents online but uploads your files to its servers with free-tier usage caps, and Bluebeam is built for visual overlay comparison of drawings (AEC markups) rather than word-level text diff — pick it for plans, AFFLIGO for wording.

Sources: PDF.js docs, Adobe Acrobat Compare feature page and pricing checked Aug 2026.

14Limitations and What to Expect

Every comparator has blind spots — here is exactly where this one stops seeing, so you never mistake silence for agreement.

Scanned PDFs

Image-only PDFs without embedded text will show no differences because the tool cannot extract text from images. Use an OCR tool first to add a text layer before comparing scanned documents.

Visual Layout Changes

The tool compares text content, not visual positioning. If text was moved to a different location on the page but the words stayed the same, it will not register as a change.

Non-Text Content

Images, charts, tables with embedded graphics, and vector drawings are not compared. The tool focuses on text content only. Embedded images will not show differences even if they changed between versions.

Reordered Paragraphs

If whole paragraphs moved position but the words stayed the same, LCS matching may flag large blocks as removed-then-added rather than moved. Read the surrounding context — identical wording in both panes means content moved, not changed.

Key Limitation

This tool is designed for text-based PDF comparison. For scanned documents, always run OCR first. For visual layout comparison, consider using specialized tools like Adobe Acrobat visual diff feature. It is not a plagiarism checker either — it diffs two documents you supply, with no web or database search.

15Privacy and Security

Contracts, not servers: why comparing inside the tab matters.

AFFLIGO Compare PDF is 100% client-side. When you upload a PDF, the file is read directly by your browser using JavaScript. Text extraction happens locally using PDF.js. The diff algorithm runs entirely in your browser memory. At no point is your document data sent to any server.

This means:

No Server Uploads

Your PDF files are never transmitted over the internet. They stay on your local device from upload to comparison to results.

No Account Required

No sign-up, no login, no email address. Open the page and start comparing immediately.

No Data Storage

Once you close the browser tab, all comparison data is gone. Nothing is stored on any server. There is no database of compared documents.

16What to Do After Comparing

Once you have identified the differences, take the next step in your document workflow.

After you have identified and reviewed all the differences, you might need to merge specific pages, extract changed sections, protect the final version with a password, add a watermark to indicate review status, or compress the document for email sharing.

FAQFrequently Asked Questions

How does PDF comparison work?
The tool extracts text from both PDFs using PDF.js and performs a word-by-word diff using the Longest Common Subsequence (LCS) algorithm. Differences are highlighted in green for additions and red for removals. The entire process runs in your browser.
Is my data private when comparing PDFs?
Yes. All processing happens entirely in your browser. PDF files are never uploaded to any server. Your documents stay 100% private. No data is stored after you close the tab.
How is the side-by-side view different from other tools?
Both documents display simultaneously in a split pane layout. The panes display side by side — scroll each independently, so you always see the same section of both documents at the same time. This makes spotting differences much faster.
What is change navigation?
Change navigation lets you jump directly between differences using Prev and Next buttons. Each change is a contiguous group of added or removed words. This is faster than scrolling through the entire document to find the next difference.
What do the green and red highlights mean?
This PDF difference checker will highlight differences word by word: green shows text added in Document 2. Red with strikethrough shows text removed from Document 1. Words in both documents stay unhighlighted.
How is this different from desktop PDF comparison tools?
AFFLIGO runs entirely in your browser with no software installation required. Desktop tools like Adobe Acrobat require a paid subscription and software installation. AFFLIGO is free with no sign-up required.
Can I use this for contract review?
Yes. PDF comparison is ideal for contract review. The word-level diff catches every modification between versions, including changed clauses, added terms, and removed provisions. A single word change in a legal document can alter its meaning.
What algorithm does the tool use?
The tool uses the Longest Common Subsequence (LCS) algorithm, the same approach used by professional diff tools like Git. It finds the maximum matching words between documents and flags everything else as added or removed.
Does the tool detect formatting changes?
No. The tool compares text content, not visual formatting. If a paragraph was reformatted (line breaks changed, font size adjusted) but the words stayed the same, it will not show as a difference. This is usually what you want for content review.
Can I compare PDFs on my phone?
Yes. AFFLIGO Compare PDF tool works in any mobile browser. Upload your PDFs, run the comparison, and view results directly on your phone — and on desktop browsers on Mac, Windows, and Chromebooks. The responsive design adapts to mobile screens.
Can I compare two PDF files for differences and highlight the changes?
Yes. Upload both PDFs and click Compare — this PDF difference checker highlights every text difference side by side: additions in green, removals in red with strikethrough. Use change navigation to jump between differences, and export the JSON report for a full record of every change.

Compare Your PDFs Now

Spot every difference between two documents in seconds. Word-by-word diff, change navigation, and exportable reports. 100% private, no uploads.

Compare PDF Free

Key Takeaways

Karan Kumar, Founder of AFFLIGO

Written by Karan Kumar

Founder of AFFLIGO. Building free, privacy-first online tools.

Karan built AFFLIGO's Compare PDF engine on PDF.js text extraction with word-by-word LCS diffing, side-by-side synced views and JSON report export — all client-side. He tests every release on real contract drafts and invoices, verifying flagged changes against manual review.