About the Text Diff
Text Diff puts two versions of a text side by side and shows you, line by line, what changed between them. It is handy for writers checking an edited draft, developers comparing config snippets, and anyone who needs to spot a change without reading both versions word for word.
How it works
Both texts are split into lines and aligned with a longest-common-subsequence algorithm, the same idea behind git diff. It finds the largest set of lines the two versions share in order, so an inserted or deleted line shows up as a single change and the lines after it still match.
Within a block of changes, each removed line is paired with an added line and compared word by word, and the exact words that changed are highlighted. Options let you ignore whitespace or letter case, show only the changed lines with two lines of context, and switch between side-by-side and unified views.
How to use
- 1
Paste or open the earlier version in Original, and the newer one in Modified.
- 2
Read the result: removed lines in red, added lines in green, with changed words highlighted.
- 3
Switch between Side by side and Unified, or tick Ignore whitespace, Ignore case or Only changes.
- 4
Click Copy diff to copy the result with - and + markers.
Worked examples
One word changed in a list
You want to confirm which item in a shopping list was edited.
Lines 1 and 3 match, so only line 2 is flagged as a removal followed by an addition.
A changed config value
Comparing two copies of a small settings file.
Inserting a line shifts the comparison
A new line is added near the top of a three-line text.
Because lines are matched by position, an inserted line makes every following line look changed. Keep this in mind when comparing texts where lines were added or removed in the middle.
Frequently asked questions
Can this compare paragraphs of writing, not just code?+
Yes. It works on any plain text. For prose, you will get the clearest result if each sentence or paragraph sits on its own line in both versions.
Does whitespace affect the comparison?+
By default yes, but you can tick Ignore whitespace (and Ignore case) to treat lines that differ only in spacing or capitalization as the same.
Will an inserted line mark everything after it as changed?+
It shouldn't any more. Lines are aligned by content, not by position, so an inserted or deleted line shows as one change and the following lines still match.
Does it show which words changed inside a line?+
Yes. When a line changes, the specific words that differ are highlighted inside it, in both views.
Is my text uploaded anywhere?+
No. The diff is calculated in your browser and nothing you paste is sent to a server.