Text Diff Checker — Compare Two Texts Line by Line
Compare two versions of text side by side and see exactly which lines were added or removed, color-coded. Spot edits in drafts, configs, or code in seconds.
What is Text Diff Checker?
Text Diff Checker takes an original and a changed text and computes a line-based diff between them, marking each line as unchanged, added, or removed. Added and removed lines are color-coded so the edits jump out instead of forcing you to re-read both versions. Because the comparison is line-based, it works equally well for prose, configuration files, and source code — anywhere you need to confirm what actually changed between two versions.
Examples
Original: roses are red violets are blue Changed: roses are red violets are violet
roses are red - violets are blue + violets are violet
The unchanged first line stays neutral; the edited line shows as one removed (-) and one added (+) line.
How to use this tool
- Paste the original text on the left.
- Paste the changed text on the right.
- View the highlighted differences.
When to use it
- Reviewing what changed between two drafts of an article or email before sending.
- Comparing an old and new config file to find the setting that changed.
- Checking a pasted code snippet against the version in your editor.
- Confirming a find-and-replace or reformat only touched the lines you expected.
Tips & gotchas
- The diff is line-based: a one-word edit shows the whole line as removed and re-added, not just the changed word.
- Trailing whitespace counts — an invisible space at the end of a line will show up as a change, so trim both sides first if you only care about visible text.
- Keep line breaks consistent: text with Windows (CRLF) vs Unix (LF) endings can flag every line as different.
- Sort or normalize both texts beforehand if order doesn't matter, so reordered-but-identical lines aren't reported as changes.
Features
- Highlight added and removed lines
- Line-by-line comparison
- Works for prose and code
- Clear color-coded result
- Side-by-side original and changed text
Specifications
| Granularity | Line-based diff |
|---|---|
| Markers | Added (+) and removed (−) lines, color-coded |
| Whitespace | Significant — trailing spaces count as changes |
| Content | Any plain text, including source code |
This tool runs in your browser. Your files and text are not uploaded to our servers, and we do not store your input.
Frequently asked questions
Does it compare by line or by word?+
It compares line by line and highlights whole added and removed lines, so a small in-line edit appears as one line removed and one added.
Why is an unchanged line showing as different?+
The usual cause is invisible trailing whitespace or different line endings (CRLF vs LF). Trim trailing spaces and normalize line endings on both sides and the line will match.
Can I compare code?+
Yes. The line-based diff works for any plain text, including source code, config files, and logs.
Does reordering lines count as a change?+
Yes. A line-based diff is order-sensitive, so moving a line is seen as removing it from one place and adding it in another. Sort both inputs first if order is not meaningful.
Related tools
Looking for more Text Tools?
Browse the full collection of free, browser-based tools.