Compare two texts
Compare two texts line by line or word by word with whitespace options and copyable output.
Loading workspace…
How it works
Normalizes CR and CRLF line endings and computes an exact longest-common-subsequence diff in your browser. Choose whether to compare exact whitespace, trim line edges, or ignore whitespace changes.
Example · Comparing two versions of a configuration snippet highlights added (+) and removed (−) lines with summary counts.
How to use this tool
- Paste the original text on the left and the modified text on the right.
- Choose line-by-line or word-by-word comparison and select whether to preserve, trim, or ignore whitespace differences.
- Select Compare to review added, removed, and unchanged counts along with a copyable unified diff.
Common questions
How are Windows CRLF and Unix LF line endings handled?
Line endings are normalized before comparing lines so switching between CRLF and LF does not mark every line as changed.
When should I use word-by-word mode instead of line mode?
Line mode works best for code, configuration files, and lists. Word mode helps spot small edits inside long paragraphs.
Does text comparison keep my text private?
Yes. Both texts stay in browser memory and are never transmitted or saved to storage.