Text Diff
Compare two texts line by line and clearly inspect additions and removals.
Your input stays on this device and is processed in your browser.Enter a value to see the result.
How to use Text Diff
- Paste the original text on the left and the changed text on the right.
- The comparison updates as you type; no button to press.
- Read the additions and removals, and copy either side if you need it.
Changes with context
The comparison works line by line, which is the right resolution for prose paragraphs, configuration files and code, and the wrong one for a single long line. Change one word in a thousand-word paragraph written without line breaks and the whole paragraph is reported as replaced.
Because lines are the unit, a change of indentation or a trailing space is a change. That is deliberate: those differences matter in a diff of a configuration file, and hiding them would make the tool lie about what is actually different.
Moved text shows up as a removal in one place and an addition in another rather than as a move. There is no third category here, so a reordered document reads as a large rewrite even when every line survived intact.
Frequently asked questions about Text Diff
Does it compare word by word or line by line?
Line by line. A line with one changed word is shown as one removal and one addition rather than highlighting the word inside it.
Is whitespace significant?
Yes. Trailing spaces and a changed indent make a line different, which is usually what you want when comparing code or configuration.
Can it compare two files?
Not directly. Open both files, paste their contents into the two editors, and the comparison works the same way.