🆚 Text Diff

Processed locally in the browser · nothing uploaded AI-Ready

Highlight line-by-line differences between two texts or contract versions.

Tip: hold Ctrl/Cmd to select multiple

Ready: paste two texts or import TXT files, then click “Start comparing”.

📄 Original text (old version)
📄 New text (new version)

How to use Text Diff

Follow the steps to get it done

1

Paste the original text on the left and the new text on the right

Open the page and start — no registration or sign-in needed.

2

Click “Start comparing” to see the two-column highlighted differences

Settings can be changed at any time; all computation happens in your browser.

3

Check deleted, added, and changed parts by colour

Copy or download the result when you are done. Nothing is kept on this site.

Page Actions

Start comparison

Run a line-level and character-level difference analysis on the two panes, and show the highlighted results in two columns below.

Clear all

After confirmation, clear both input boxes and the comparison results, and start over.

Import two files with one click

Hold Ctrl/Cmd to select two TXT files. They are imported into the left and right panes in order of modification time and compared automatically.

Import TXT (left)

Import the contents of a TXT file into the left original-text box.

Import TXT (right)

Import the contents of a TXT file into the right new-text box.

Original text input

Paste text, or drag a TXT file onto the left card, to enter the older version of the text.

New text input

Paste text, or drag a TXT file onto the right card, to enter the newer version of the text.

Drag and drop import

Drag a TXT file directly onto either the left or the right card, and its contents are filled into the matching input box.

How to Let AI Use It

Call it directly through the MCP endpoint, or let an AI assistant operate the browser

Call it directly through this site's MCP endpoint (JSON-RPC 2.0, POST https://tools.waoww.com/mcp) — no need to open the browser. MCP tool name: text_diff_and_stats (tool page /tools/textdiff/index_en.html/). Example call:

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "text_diff_and_stats",
    "arguments": {
      "text_a": "Clause 1: Payment by T/T, 30% in advance.\nClause 2: Delivery within 30 days.",
      "text_b": "Clause 1: Payment by T/T, 50% in advance.\nClause 2: Delivery within 30 days.",
      "ignore_whitespace": false
    }
  }
}

Returns line-level differences plus character, word, and line counts for each of the two texts. When only text_a is passed, it only produces statistics and does not compare.

Example prompt (send it to your AI assistant as-is)

「Open tools.waoww.com/tools/textdiff/ and compare the old and new versions of the contract, marking which lines changed」

How It Works & Highlights

How it works, and where it fits

Built on Google's diff_match_patch algorithm: line-level difference analysis first locates the changed lines, then character-level diff pinpoints the changed characters within those lines. The two-column view is aligned by row. Deleted lines are marked red, added lines green, and changed lines blue, with character-level differences highlighted again in a darker colour and bold. All calculation runs locally in the browser, and no data is uploaded.

Highlights

  • ✓ Line-level plus character-level diff, so you can see exactly which character changed
  • ✓ An aligned two-column view, with deleted, added, and changed parts clear in three colours
  • ✓ Drag TXT files in to import, and import two files with one click to compare them automatically
  • ✓ Purely local calculation, so contracts and sensitive text are never uploaded

Tips

  • 💡 When comparing contracts, paste both versions in first. Red is a deleted clause, green is an added one, and blue changed lines deserve the closest look.
  • 💡 Two TXT files are imported in modification-time order, with the older version on the left and the newer version on the right. Do not mix them up.
  • 💡 Before comparing large files, confirm both sides use UTF-8 encoding, so garbled text is not mistaken for a difference.

FAQ

Privacy, format limits, and usage tips

The code sets no hard length limit. No more than 2MB in a single comparison is recommended. Split very large texts into parts, so the browser does not slow down.
No. All comparison is done locally in the browser, and no data is uploaded.
Hold Ctrl or Cmd to select two TXT files. They are imported into the left and right panes in order of modification time and compared automatically, with the older version on the left and the newer version on the right.
Deleted lines are marked red, added lines green, and changed lines blue. Character-level differences are highlighted again in a darker colour and bold. The two columns are shown aligned by row.
Any recent browser works (Chrome, Edge, Firefox, or Safari from the last three years). It works on phones too, but batch file handling and table checks are more efficient on a large screen.
Refresh the page first (resources may be cached by the browser), then check that the file format and size match the hints on the page. If it still fails, send the steps to reproduce via 「Feedback」 in the top bar.
Text tools mainly handle one piece of content at a time. Some tools can generate multiple items in one run or import two files at once — see the workbench buttons.
A two-column line-by-line and character-level diff: deletions and before-changes in red, additions and after-changes in green, with line counts.
Yes, once the page has loaded successfully (it relies on the browser cache). If you clear the cache or switch devices, you need to go online to load it again.
No. Favorites and recent-use records only store tool names, never your files or text. When you are not signed in, favorites are kept only in your browser's localStorage; after signing in they sync to your account and work across devices. Recent-use records stay on your own machine.
First check that the input is complete and the format matches the hints on the page — you can click the example on the page to verify quickly. If it is still wrong, refresh the page and send us the steps and a screenshot via the feedback form.
Send your question or suggestion via 「Feedback」 in the top bar. Describe the use case and the outcome you want, and we will assess it before updating the tool and the page.