About the Text Compare
Text Compare checks two pieces of text against each other, one line at a time, and marks the lines that differ. Paste the original on the left and the edited version on the right; matching lines stay plain, while each changed line shows what was there before in red and what replaced it in green. It's a fast sanity check for lists, settings, and short documents.
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
Updated price list
A supplier sends a revised list of three items.
Inserted line
A new item is added at the top of a five-line list.
Every line moved down one position, so each position now holds different text. Add new lines at the end, or compare sorted lists, to avoid this.
Frequently asked questions
Does this compare word by word?+
Lines are aligned first, then each changed line is compared word by word and the differing words are highlighted.
Can I use this to compare code instead of plain text?+
Yes. It uses the same engine as Code Diff, so inserted and deleted lines are handled correctly in code too.
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.
Is the comparison case-sensitive?+
By default yes. Tick Ignore case to treat "Apple" and "apple" as the same, and Ignore whitespace for spacing differences.
Is my text uploaded anywhere?+
No. The comparison runs in your browser and the text isn't sent to a server or saved.