Text Diff and Compare Tool
Compare two blocks of text side by side and highlight the differences. Find additions, deletions, and changes instantly.
Text Diff and Compare Tool tool
Example
Input: Original: apple / banana / cherry. Modified: apple / blueberry / cherry (one item per line)
Result: +1 added, -1 removed, 2 unchanged; the diff shows -banana followed by +blueberry
The texts are compared line by line. Lines present in both stay unchanged, while the replaced line is shown as one removal and one addition.
- Paste or type the original text into the left box.
- Paste or type the changed text into the right box.
- Read the diff below: green lines marked + were added and red lines marked - were removed.
- Check the summary bar for the number of added, removed and unchanged lines.
- For a changed line, compare the red old version with the green new version under it.
How to Compare Two Texts Line by Line
This text diff tool compares two versions of a text and shows every line that was added or removed. Paste the original on the left and the new version on the right. The result appears below as one color-coded list: green lines marked + were added, and red lines marked - were removed.
The comparison works line by line, like the diff command or a Git pull request. If one word in a line changes, the whole line shows twice: first the old version in red, then the new one in green. Read the pair together to find the edit. A summary bar counts the lines added, removed and left unchanged, which tells you at a glance how big a revision is.
Spaces count. A line with a trailing space, or a tab where the other has spaces, is a different line to the tool. It will show as changed even if it looks the same. If only the words matter to you, clean both texts first with the Whitespace Remover. A missing line break at the very end of a text is ignored, so it will not flag your last line. People use it to check edits to a contract or essay, compare two config files, or see what changed between two exports of a list. For JSON data, the JSON Diff Viewer is a better fit, because it ignores key order and formatting. Both texts stay in your browser.
Frequently Asked Questions
Related Tools
Find and Replace
Find and replace text with regular expressions, capture groups, case-sensitive matching, and a live match count.
Text and WritingWord Counter and Character Counter
Count words, characters, sentences, and paragraphs in your text. Includes reading time and speaking time estimates.
Text and WritingRemove Duplicate Lines
Remove duplicate lines from text while keeping the original order. Supports case-sensitive and case-insensitive modes.
Text and Writing