TextToolbox Instant text & writing tools

Text Diff

A text diff compares two versions line by line and marks each line as unchanged, added or removed. Lines that merely moved appear as one removal and one addition, because line-level diffing has no concept of relocation. Everything runs in your browser, so unpublished drafts stay on your device.

Paste two versions — the diff updates as you type. Both texts stay on your device.

Added 0
Removed 0
Unchanged 0

See exactly what changed

Comparing two versions by eye is the most error-prone chore in editing: a swapped value in a config, a silently reworded clause in a contract, one changed line in a 200-line export. This tool runs a line-based diff — the same longest-common-subsequence idea behind git — so shared lines are matched up automatically and only real differences are flagged. Removed lines are prefixed −, added lines +, and unchanged lines are dimmed so the changes pop out.

Worked example

Put this four-line config on the Original side: server_port = 8080, timeout = 30, retries = 3, log_level = info — and the same text on the Changed side but with timeout = 60. The diff shows exactly one removed line (− timeout = 30) followed by one added line (+ timeout = 60), with the other three lines unchanged: counts read 1 added, 1 removed, 3 unchanged. An edit always appears as such a −/+ pair.

Frequently asked questions

Why does an edited line show as one removed plus one added?

Because the comparison works line by line: a line either matches exactly or it doesn't. An edit therefore appears as the old line removed (−) and the new line added (+). Word-level highlighting inside a changed line is a finer-grained technique we may add later — for now the line pair tells you exactly where to look.

Is my text uploaded to compare it?

No. The diff is computed with JavaScript in your browser tab — neither side of the comparison is sent to a server, stored, or logged, and this page deliberately keeps your text out of the URL too. Close the tab and both texts are gone.

Can it diff code and config files?

Yes — line-based comparison is exactly how developer diff tools work, so it's well suited to source code, configs, .env files, SQL, and CSV rows. Paste the old version on the left and the new one on the right; each changed line shows up as a −/+ pair.

What does the LCS approach actually do?

LCS stands for longest common subsequence: the tool finds the longest run of lines the two texts share in the same order, treats those as 'unchanged', and reports everything else as removed or added. It's the same core idea behind git's diff, which is why the output format looks familiar.

Embed this tool on your site

Free to use, no attribution required beyond the link already in the widget. It runs entirely in the visitor's browser, so it adds no load to your server.

Preview the widget