gitwtfhub

wtf is compare?

opensourcelegal2026/compare — explained in plain English

Analysis updated 2026-05-18

1PythonAudience · developerComplexity · 3/5LicenseSetup · easy

TL;DR

A free, private tool that compares two Word document drafts and produces a verified redline with real tracked changes.

Mindmap

mindmap
  root((repo))
    What it does
      Compares two Word drafts
      Verified tracked changes
      Colored redline view
    Tech stack
      Python engine
      OOXML revision marks
      Vercel deployment
    Use cases
      Legal document redlining
      Private local comparison
      API and CLI automation
    Audience
      Lawyers and legal teams
      Developers building on the API

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Why would anyone build with this?

REASON 1

Compare two Word drafts of a legal document and get a colored redline showing every change.

REASON 2

Download a Word file with real, acceptable or rejectable tracked changes instead of a static markup.

REASON 3

Run the tool locally or on your own Vercel deployment so sensitive documents never leave your control.

REASON 4

Use the command line or API version to compare documents as part of an automated workflow.

What's in the stack?

PythonOOXMLVercelLibreOfficedocx-preview

How it stacks up

opensourcelegal2026/compare0xustaz/streamgatea-bissell/unleash-lite
Stars111
LanguagePythonPythonPython
Setup difficultyeasyhardhard
Complexity3/54/54/5
Audiencedeveloperdeveloperresearcher

Figures from each repo's GitHub metadata at analysis time.

How do you spin it up?

Difficulty · easy Time to first run · 5min

Local use needs only Python and the lxml package, the CLI's PDF output additionally requires LibreOffice to be installed.

MIT license: free to use, modify, and distribute, including commercially, as long as the copyright notice is kept.

Wtf does this do

Compare is a free tool for comparing two versions of a Word document and producing a redline, the kind of colored markup lawyers use to see exactly what changed between drafts. You upload the old and new version, and it shows the document rendered as it actually looks, with deleted text struck through in red, inserted text underlined in blue, and paragraphs that moved shown in green. You can then download a real Word file with genuine tracked changes that anyone can accept or reject in their own copy of Word, or save the marked-up view as a PDF. What sets this apart is a built-in correctness check. Before showing you any result, the tool simulates clicking accept all changes and checks that this exactly reproduces the new draft, then simulates reject all changes and checks that it exactly reproduces the old draft. If either check fails, it refuses to show a redline rather than risk giving a wrong one, and this verification runs on every single comparison, not just in testing. It tells you it stores nothing: documents are compared only in memory and then discarded, with no database or upload storage involved. You can run it entirely on your own machine with a single Python dependency, deploy your own copy to Vercel, or use a command line version that works without a browser at all. There is also a simple API that accepts two base64-encoded Word files and returns the tracked-changes file, a colored blackline version, statistics on how much changed, the verification results, and separate reports for changes in footnotes, headers, footers, and formatting-only differences that are not marked inside the Word file itself. The tool compares body text and tables word by word, matching table rows by similarity first. It has some limits: files must be under 1.5 MB each, both drafts need any earlier tracked changes already accepted or rejected before comparing, and documents using Word content controls are refused rather than handled incorrectly. Under the hood it aligns paragraphs by text similarity, does a word-level diff on the parts that changed, and writes the differences as native Word revision marks. The whole comparison engine lives in one lightweight Python file, and the project is released under the MIT license.

Yoink these prompts

Prompt 1
Help me run this document comparison tool locally using python3 local_server.py.
Prompt 2
Show me how to call the /api/compare endpoint with two base64-encoded Word files.
Prompt 3
Walk me through deploying my own copy of this redline comparison tool to Vercel.
Prompt 4
Explain how the accept-all and reject-all verification check works in api/compare.py.

Frequently asked questions

wtf is compare?

A free, private tool that compares two Word document drafts and produces a verified redline with real tracked changes.

What language is compare written in?

Mainly Python. The stack also includes Python, OOXML, Vercel.

What license does compare use?

MIT license: free to use, modify, and distribute, including commercially, as long as the copyright notice is kept.

How hard is compare to set up?

Setup difficulty is rated easy, with roughly 5min to a first successful run.

Who is compare for?

Mainly developer.

View the repo → Decode another repo

This repo across BitVibe Labs

Don't trust strangers blindly. Verify against the repo.