Private line-by-line text comparison
Compare two text snippets line by line in your browser. See added, removed and unchanged lines without uploading either version.
Line comparison
A visual comparison, rather than an applicable patch. Up to 300 lines and 30,000 characters per side.
Inputs are processed in this tab. No text, paths or results are sent to our server or saved in an account. Privacy details.
From input to a useful answer.
- 01
Paste earlier text on the left and newer text on the right.
- 02
Choose whether trailing spaces and tabs should affect matching.
- 03
Read additions and removals, then edit the original separately.
Compare whole lines in their original order
The comparison keeps matching lines in sequence and labels unmatched lines as removed or added. A changed line normally appears as one removal and one addition. Counters describe line operations, not changed-word counts or the number of editing actions performed by a person.
Replacing coffee with cocoa beneath an unchanged tea line gives one removal, one addition and one unchanged line. A moved paragraph can also appear as removal plus addition. The tool does not track paragraph identity, interpret meaning or show character-by-character changes within a line.
Choose how trailing whitespace should matter
Carriage-return and Windows line endings are normalised to newline before comparison. The trailing-whitespace option ignores spaces and tabs at line ends for matching. It does not ignore indentation, internal spaces, letter case or every Unicode whitespace character.
Leave that option off when trailing whitespace matters. If lines match only because it is ignored, the unchanged display uses the left-hand line. An equality result with this option therefore does not mean the two original strings were byte-for-byte identical.
Review the output without applying it as a patch
Each side is limited to 30,000 characters and 300 lines. Blank lines count, including a final empty line created by a trailing newline. Split larger documents into meaningful sections or use a local file-comparison tool for complete files and repositories.
Visible plus and minus markers make the output readable, but it is not an applicable patch: it lacks file headers and unified-diff hunk positions. The tool never changes either source, applies edits or executes text. Make changes separately, then compare again when needed.
References
Git — git diff documentation and patch output ↗GNU Diffutils — Context formats and patch use ↗A few useful answers
Can I feed this output to patch or git apply?
No. It is a review display without file and hunk metadata. Use a file or repository diff tool to produce an applicable patch.
Why does one changed line count as two operations?
The old line is removed and its replacement added. Counters track additions and removals, not human editing steps.
What does ignoring trailing whitespace ignore?
Only spaces and tabs at each line’s end. Leading and internal whitespace and letter case still affect matching.