◆ Online Dev Kit

Text Diff

Compare two texts and see added / removed lines.

About this tool

Paste two versions of text and see a line-by-line comparison: lines prefixed with - were removed, + were added, and unchanged lines are shown for context. Useful for comparing config files, copy revisions or code snippets. Runs entirely in your browser.

Common use cases

How it works

Text diff uses an algorithm (typically Myers diff or LCS-based) to find the longest common subsequence between two texts, then identifies lines that were added, removed, or modified. Added lines are highlighted in green, removed lines in red, and unchanged lines remain plain. The algorithm works line-by-line, comparing each line from the original text to each line in the modified text to find the optimal set of changes.

FAQ

Is this a line diff or character diff?

Line-based — it compares whole lines using a longest-common-subsequence algorithm, like a simplified git diff.

Is my text private?

Yes — the comparison happens locally in your browser; nothing is uploaded.

What is the difference between diff and merge?

Diff shows the differences between two files. Merge combines changes from two files into one, often used in version control when branches diverge.

Why does diff sometimes show odd matches?

Diff algorithms find the longest common subsequence, which may not always match human intuition. Semantic diff tools understand code structure and can produce more meaningful comparisons.