Comparisons
Document compare shows what changed between two versions of a document: Word (.docx), PDF, HTML, Markdown or plain text, in any mix, read in the page with nothing uploaded. Paragraphs are lined up first, so a long agreement lines up even when clauses have moved, then compared word by word, so insertions, deletions and replacements read as whole phrases.
Moved paragraphs are one move, not a deletion and an insertion; formatting changes are listed too. View side by side or inline, with unchanged stretches folded. Accept or reject each change and the clean copy follows; export the redline, the clean copy or a change report.
Two versions of an agreement
A non-disclosure agreement as sent and as it came back marked up: a new date, a narrowed definition, a proviso, an italic word, a new exception, a shorter term, two clauses swapped and a new section. Alt and the arrow keys move from change to change; the list beside it leads to each one.
Get the code
<script src="/assets/bmx-components.min.js"></script> <bmx-document-compare id="dc-nda" original-label="As sent (2 October)" revised-label="Returned (9 October)" style="inline-size: 100%"></bmx-document-compare>
A policy, decided change by change
Two drafts of a remote-working policy in Markdown, shown inline. Accept or reject each change in the list; anything not yet decided counts as accepted. The clean copy below follows every decision.
The clean copy
Get the code
<script src="/assets/bmx-components.min.js"></script> <bmx-document-compare id="dc-policy" view="inline" format="markdown" original-label="Draft 1" revised-label="Draft 2" style="inline-size: 100%; --bmx-document-compare-max-height: 26rem"></bmx-document-compare>
Your own files
Open or drop two files of your own — a Word document against its PDF, a web page against last year's. They are read here, in your browser; nothing is sent anywhere. For comparing in bulk, the same engine runs on a server.
// Node 18 or later: the comparison engine, from the Gold package.
import { readDocument, compareDocuments, redlineHtml, changesCsv } from './dist/node/bmx-document-compare.mjs';
const template = await readDocument(await readFile('template.docx'), { name: 'template.docx' });
for (const name of await readdir('signed')) {
const signed = await readDocument(await readFile(`signed/${name}`), { name });
const result = compareDocuments(template, signed);
if (result.changes.length) {
await writeFile(`reports/${name}.html`, redlineHtml(result));
await writeFile(`reports/${name}.csv`, changesCsv(result));
}
}