Text Compare
What a diff actually does
Comparing two texts line by line from the top falls apart the moment something is inserted — everything after it looks changed. A proper diff finds the longest run the two versions still have in common and marks only what genuinely differs, so an inserted paragraph shows as one insertion.
Which view to use
- Lines — code, configuration, lists, anything where a line is a unit.
- Words — prose, where a single changed word should not light up the whole paragraph.
Share this tool with friends
Free to use, no sign-up, works on any phone.
Frequently Asked Questions
It finds the longest sequence the two texts still share, and treats everything outside it as added or removed. That is the same idea behind the diff in version-control systems, so a paragraph inserted in the middle shows as one insertion rather than shifting everything below it.
Line view compares whole lines and suits code, lists and documents. Word view compares individual words and is better for prose, where one changed word should not mark the whole paragraph as different.
Yes. Both are optional switches, which is useful when comparing text that has been reformatted or retyped and you only care about the actual wording.
Comparison work grows with the square of the length, so very large texts get slow. Beyond about two thousand lines the tool says so rather than freezing the page.
No. Both versions stay in your browser, which matters when you are comparing drafts of a contract or unreleased copy.