Text
Text Compare / Diff Tool
Find the differences between two blocks of text line by line, highlighting additions and deletions.
What is Text Compare / Diff Tool?
Comparing two versions of the same content by eye is unreliable, especially when they are nearly identical. This tool uses the longest-common-subsequence algorithm — the same approach the diff command and Git use to work out which lines genuinely changed, rather than comparing crudely by position.
That distinction matters. Insert one new line in the middle and a naive comparison reports every subsequent line as changed; this algorithm reports exactly one addition. Results appear with two line-number columns, additions on green, deletions on red.
How to use
- Paste the original into the left field and the modified version into the right.
- The comparison appears below, with a summary of lines added, removed and unchanged.
- Turn on Ignore case when only the content matters, not capitalisation.
- Turn on Ignore whitespace when the two versions differ in indentation or trailing spaces.
Frequently asked questions
Can it compare word by word instead of line by line?
Currently it compares by line, matching how Git displays diffs by default. For longer text, line-level comparison is usually far easier to read than word-level.
Is my pasted content transmitted anywhere?
No. The whole comparison runs in your browser. That matters when you are diffing source code, contracts or internal documents.
How large a text can it handle?
A few thousand lines stays smooth. The algorithm's cost scales with the product of both line counts, so very large files will slow the browser down — reach for a command-line tool at that point.