Text Diff Checker
Put two versions of a text side by side and see exactly which lines were added, removed or left alone.
Your data stays on your device
Original text
- characters
- 0
- lines
- 0
- size
- 0 B
Modified text
- characters
- 0
- lines
- 0
- size
- 0 B
Comparison granularity is the line, so a one-word edit appears as a removed line plus an added line. For structured data, the JSON Compare tool gives far more meaningful results.
About this tool
Spotting the difference between two similar blocks of text by eye is unreliable, especially when the change is a single character in a long line. A line-based diff makes it obvious.
The comparison uses a longest-common-subsequence algorithm, the same approach version control uses, so unchanged blocks stay aligned rather than everything after an insertion appearing as changed. Whitespace and case sensitivity are configurable.
How to use this tool
- Paste the original text on the left and the modified text on the right.
- Choose whether to ignore case, trailing whitespace or blank lines.
- Press Compare to see the marked-up result.
- Read the summary for counts of added, removed and unchanged lines.
Key features
- Line-based comparison using a longest-common-subsequence algorithm
- Added, removed and unchanged lines clearly marked
- Options to ignore case, trailing whitespace and blank lines
- Summary counts for each change type
- Line numbers from both sides shown together
- Identical inputs confirmed explicitly
Example
Input — Text
left: alpha / beta / gamma
right: alpha / delta / gammaOutput — Diff
1 alpha
- 2 beta
+ 2 delta
3 gamma
1 added, 1 removed, 2 unchangedGood to know
- The diff is line-based. A single changed word shows as one removed line plus one added line rather than a word-level highlight.
- Very large texts take noticeably longer, since the algorithm cost grows with the product of the line counts.
- For structured data, the JSON Compare tool gives far more meaningful results.
Frequently asked questions
Why is a small edit shown as a whole changed line?
Because the comparison granularity is the line. That matches how diffs work in version control and keeps the output predictable.
Should I use this for JSON?
No. Reformatting or reordering keys produces enormous noise. The JSON Compare tool compares structure and ignores irrelevant differences.
What does ignoring trailing whitespace do?
It stops lines that differ only by spaces at the end from being reported, which removes a very common source of false differences.
Are line endings normalised?
Yes. CRLF and LF are treated the same, so a file that changed platform does not appear entirely rewritten.
Your data stays on your device
Your data is processed locally in your browser and is not uploaded to our server. This page keeps working after you go offline, because there is nothing to send.