Text Diff
Compare two texts line by line or word by word and see additions and deletions.
Paste both texts; the comparison updates as you type. Ctrl/⌘ + Enter compares immediately.
How the comparison works
This online text diff tool compares two pieces of text and highlights what changed. It runs the Myers difference algorithm that Git and most code editors use, entirely in your browser. Line mode compares whole lines and suits code, configuration files, lists and logs. Word mode is better for prose or emails where a sentence was rewritten. Character mode shows the smallest edits, such as a changed digit or a typo. Additions appear in green, deletions in red with a strikethrough, and the summary counts how many lines or segments were added and removed.
Tips and options
- Ignore whitespace: Line mode ignores leading and trailing spaces or tabs on each line; Word mode ignores spacing between words; Character mode collapses runs of spaces first.
- Ignore case treats "Taiwan" and "taiwan" as the same; where tokens match only because of this, the spelling from the changed text is shown.
- Copy result: Line mode gives unified-style text with each line prefixed by +, - or a space, ready for a ticket or chat. Word and Character mode use {+added+} and [-removed-] markers.
- CRLF and LF line endings are normalised first, so files from Windows and macOS do not show every line as changed.
- Chinese text without spaces is split by punctuation in Word mode; Character mode is usually the most readable choice for Chinese prose.
Privacy
Both texts stay in your browser. Nothing is uploaded, so you can compare contracts, source code or private notes safely.