Text Diff: Compare two texts

Compares two text versions line by line and highlights added, changed and removed lines. Runs fully locally in your browser.

How useful is this tool?

The result will appear here …

Text Diff: compare two texts in seconds

You have two versions of a text and want to know what changed? This text diff compares both versions line by line and highlights added, removed, and unchanged lines in color. You can see at a glance which parts are new, which were cut, and where the text stayed the same. Useful when revising articles, comparing contract drafts, or tracing what a colleague changed in your text.

You paste the original text and the new text and click "Compare". The result shows the differences one below the other: unchanged lines stay as they are, new lines are marked green, removed lines red. You also get a summary of how many lines are unchanged, added, and removed. You can copy the finished diff with one click.

How the comparison works

The tool uses a line-based comparison based on an LCS approach (Longest Common Subsequence). It finds the longest common sequence of both texts and derives the differences from it. This keeps even larger restructures recognizable, because moved paragraphs are not falsely counted as completely removed and re-added.

  • Version A is your original text.
  • Version B is the revised text.
  • Unchanged lines stay as they are, new lines are green, removed lines red.
  • The comparison runs entirely in your browser, your texts never leave your device.

What it can and cannot do

The text diff suits all kinds of text, from articles and papers to configuration files and short code snippets. It works line-based, not word-based: to see changes within a line on word level, you can break the text into separate lines first. For very large texts, split them into manageable sections so the result stays readable.

Frequently asked questions

What is a diff?

A diff shows the differences between two texts or files. It marks which lines were added, removed, or left unchanged, so you can see what changed at a glance.

Is my input safe?

Yes. The comparison runs entirely in your browser. Your texts are not sent to a server and not stored; they never leave your device.

Does the tool work word-exact?

The text diff works line-based and compares whole lines. For a word-level comparison, you can manually break the text into separate lines first.

What text sizes are possible?

There is no fixed upper limit. For very long texts, it is recommended to split them into sections so the colored result stays clear and readable.

Can I save the result?

You can copy the finished diff with one click and paste it into a document or email. There is no automatic saving; the tool works locally and without an account.