PDF Diff

Compare two PDF documents page by page and highlight text differences

Extract text page by page from two PDFs and diff at word, line or character level, reporting per-page status and overall similarity.

Example Results

1 examples

Compare two versions of a PDF

Spot text changes between an original and a revised PDF at word level.

{
  "pageCountOriginal": 6,
  "pageCountModified": 6,
  "overallSimilarity": 0.94
}
View input parameters
{ "originalFile": "/public/samples/pdf/sample-multipage.pdf", "modifiedFile": "/public/samples/pdf/sample-multipage-revised.pdf", "comparisonMode": "word", "caseSensitive": false, "ignoreWhitespace": true }

Click to upload file or drag and drop file here

Maximum file size: 100MB Supported formats: application/pdf

Click to upload file or drag and drop file here

Maximum file size: 100MB Supported formats: application/pdf

Key Facts

Category
Documents & PDF
Input Types
file, select, checkbox
Output Type
json
Sample Coverage
4
API Ready
Yes

Overview

The PDF Diff tool allows you to compare two PDF documents page by page to identify and highlight text differences. By extracting text from your original and modified files, it performs precise comparisons at the word, line, or character level, providing an overall similarity score and detailed per-page status.

When to Use

  • When reviewing contract revisions to ensure no unauthorized text changes were introduced.
  • When verifying that a newly exported PDF matches the text content of an older draft.
  • When auditing multi-page documents for minor typos, punctuation updates, or formatting shifts.

How It Works

  • Upload the original PDF and the modified PDF document into the designated file inputs.
  • Select your comparison mode (word-level, line-level, or character-level) and configure case sensitivity and whitespace preferences.
  • Run the tool to extract text page-by-page and generate a JSON report detailing overall similarity and specific text differences.

Use Cases

Legal document auditing to track clause modifications between contract drafts.
Academic paper proofreading to verify edits made during peer review.
Technical manual verification to confirm that updated specifications match original text requirements.

Examples

1. Comparing Contract Drafts

Legal Assistant
Background
A legal assistant needs to verify that a client-returned contract matches the original draft, ensuring no hidden clauses were modified.
Problem
Manually reading through a 15-page contract to spot minor word changes is time-consuming and error-prone.
How to Use
Upload the original contract as the Original PDF and the returned version as the Modified PDF. Set the comparison mode to word-level, check ignore whitespace, and run the comparison.
Example Config
comparisonMode: "word", caseSensitive: false, ignoreWhitespace: true
Outcome
The tool outputs a JSON report showing an overall similarity score of 0.98, highlighting the exact pages where text modifications occurred.

2. Verifying Code Documentation Updates

Technical Writer
Background
A technical writer updated a software manual PDF and needs to confirm that only the intended lines of text were changed.
Problem
Ensuring that formatting changes or accidental keystrokes did not alter other sections of the document.
How to Use
Upload the previous manual version and the new version. Select line-level comparison and enable case sensitivity to catch exact code syntax changes.
Example Config
comparisonMode: "line", caseSensitive: true, ignoreWhitespace: false
Outcome
The tool generates a report indicating 100% similarity on unchanged pages and flags the specific lines that were modified on the updated pages.

Try with Samples

pdf, text, file

Related Hubs

FAQ

What comparison modes are supported?

You can compare documents at the word, line, or character level.

Can I ignore capitalization differences when comparing PDFs?

Yes, you can disable the case-sensitive option to ignore capitalization differences.

Does the tool compare images or visual layouts?

No, this tool extracts and compares text content page by page; it does not perform visual or image-based layout comparisons.

How does the tool handle spaces and line breaks?

You can enable the ignore whitespace option to prevent formatting spaces from flagging differences.

What output format does the tool generate?

The tool outputs a JSON report containing page counts and an overall similarity score.

API Documentation

Request Endpoint

POST /en/api/tools/pdf-diff

Request Parameters

Parameter Name Type Required Description
originalFile file (Upload required) Yes -
modifiedFile file (Upload required) Yes -
comparisonMode select No -
caseSensitive checkbox No -
ignoreWhitespace checkbox No -

File type parameters need to be uploaded first via POST /upload/pdf-diff to get filePath, then pass filePath to the corresponding file field.

Response Format

{
  "key": {...},
  "metadata": {
    "key": "value"
  },
  "error": "Error message (optional)",
  "message": "Notification message (optional)"
}
JSON Data: JSON Data

AI MCP Documentation

Add this tool to your MCP server configuration:

{
  "mcpServers": {
    "elysiatools-pdf-diff": {
      "name": "pdf-diff",
      "description": "Compare two PDF documents page by page and highlight text differences",
      "baseUrl": "https://elysiatools.com/mcp/sse?toolId=pdf-diff",
      "command": "",
      "args": [],
      "env": {},
      "isActive": true,
      "type": "sse"
    }
  }
}

You can chain multiple tools, e.g.: `https://elysiatools.com/mcp/sse?toolId=png-to-webp,jpg-to-webp,gif-to-webp`, max 20 tools.

Supports URL file links or Base64 encoding for file parameters.

If you encounter any issues, please contact us at [email protected]