ToolVaults

Text Diff — Compare Two Texts Line by Line

Compare two blocks of text line by line and see exactly what changed. Runs entirely in your browser using a longest-common-subsequence algorithm.

Runs 100% in your browser — nothing is uploaded.

2 added 1 removed 3 unchanged
11 Roses are red
22 Violets are blue
3Sugar is sweet
3+Honey is sweet
44 And so are you
5+Especially in this stanza

Frequently asked

Which diff algorithm does this use?

A longest-common-subsequence (LCS) diff at the line level. Same family used by tools like Git diff, though not with the optimizations Git makes for very large inputs.

Does it work for code?

Yes — treat each line as a unit. It highlights added, removed, and unchanged lines. For fine-grained (character-level) diffs, use a code editor with a built-in diff view.

What is the max input size?

The algorithm is O(n×m) memory. Around 3,000–5,000 lines per side is comfortable; larger inputs will start to lag. For huge diffs, break them into smaller sections.

Related tools