Skip to content
GivenTool

Compare text (diff checker)

Compare two texts line by line or word by word and see additions and deletions side by side or inline.

Loading tool…

Paste the original in the left box and the changed version in the right. The differences appear below: removed text in red and struck through, added text in green. Line mode suits code, configuration files and lists; word mode suits prose, contracts and translations, where a whole paragraph is one line. In side-by-side line view, changed lines are paired and the exact words that changed inside them are highlighted.

The comparison uses Myers' O(ND) difference algorithm (the one behind git diff), implemented from scratch and run in your browser: it finds the smallest set of insertions and deletions that turns one text into the other. Options let you ignore letter case or differences in spacing. If two long texts differ almost everywhere, the tool stops searching for a minimal diff after 4,000 edits and shows the changed middle as one removed and one added block, so the page stays responsive.

Nothing is uploaded, which matters for the things people usually compare: contracts, source code and internal documents.

How to use it

  1. Paste the original text on the left and the new version on the right.
  2. Choose to compare by line or by word, and a side-by-side or inline view.
  3. Tick "Ignore case" or "Ignore whitespace differences" if those changes do not matter.
  4. Read the summary of removed and added lines or words, and copy the diff as text if you need to share it.

Frequently asked questions

Which algorithm does it use?

Myers' diff algorithm (1986), which computes a shortest edit script. Common leading and trailing lines are stripped first, so typical edits are compared almost instantly.

What does "copy diff as text" produce?

In line mode, a unified-style listing with "- " for removed lines, "+ " for added lines and two spaces for unchanged lines. In word mode, removed text in [-brackets-] and added text in {+braces+}.

How large can the texts be?

Up to 200,000 characters each. Very different long texts fall back to a coarse block diff, and the page says so.

Is the text sent to a server?

No. The diff runs entirely in your browser tab and the result is rendered as plain text, never as HTML.