Free plan
Compare Documents
See what changed between two versions of a document
About this tool
This tool reads the words of two documents and shows what was added and what was removed. It works with Word, PDF, Excel and text files, and you can mix types. You get a similarity score (how alike the two are), a list of changes and a marked-up page. You can ignore capital letters, and choose to compare whole paragraphs or single words.
For example, you receive a revised contract and want to see exactly which sentences your colleague changed.
How to use it
- Choose this tool.
- Add the original document in the first box and the revised one in the second box.
- Choose whether to compare single words or whole paragraphs, and whether capital letters should count.
- Press Generate.
- Read the result on screen or download the marked-up page.
What you get back
You get the list of changes and a similarity score on screen. You can also download a web page where new text is green and removed text is red.
GOOD TO KNOW
The words are compared, not the layout, fonts or pictures. A scanned document has no text: run OCR first. Counts as two documents.
TEST IT LIVE
Try Compare Documents in the Studio
One click opens the Studio with this tool already selected. Add your file and see the result in seconds.
Family
Documents
Plan
Free
Method
POST
Endpoint
/v1/documents/compare
Tool ID
documents.compare
Authentication
API key
Accepts
Text and settings
Background jobs
Yes
Usage group
Documents
For developers
Use it from your code
cURL
curl -X POST "https://app.h2i.davixlabs.io/v1/documents/compare" \
-H "X-Api-Key: $DAVIX_H2I_API_KEY" \
-F 'file=@document.pdf' \
-F 'other=@document.pdf' \
-F 'level=word' \
-F 'ignore_case=false' \
-F 'response=url'Node.js
const { DavixH2I } = require('@davixlabs/h2i-sdk');
const h2i = new DavixH2I({ apiKey: process.env.DAVIX_H2I_API_KEY, baseUrl: process.env.DAVIX_H2I_URL });
const result = await h2i.documents.compare({
"file": 'document.pdf',
"other": 'document.pdf',
"level": "word",
"ignore_case": false,
"response": "url"
});
console.log(result.data, result.requestId);PHP
<?php
require 'vendor/autoload.php';
$h2i = new \Davix\H2I\Client(['apiKey' => getenv('DAVIX_H2I_API_KEY'), 'baseUrl' => getenv('DAVIX_H2I_URL')]);
$result = $h2i->documents()->compare([
'file' => 'document.pdf',
'other' => 'document.pdf',
'level' => 'word',
'ignore_case' => false,
'response' => 'url',
]);
echo $result->requestId;More in Documents
