Text Diff Checker
Compare two blocks of text line by line and see exactly what was added, removed or changed.
No text to compare yet.How it works
The tool splits both texts into lines and finds their Longest Common Subsequence (LCS) — the largest set of lines that appear in the same order in both — using the classic dynamic-programming LCS algorithm. Lines in that common sequence are marked 'same'; lines only in the original are 'removed'; lines only in the changed version are 'added'. An edited line shows up as a removed line immediately followed by an added line, since the algorithm has no concept of a partial line change — only whole lines matching or not.
Example
Comparing 'a / b / c' against 'a / x / c' shows line 1 (a) and line 3 (c) as unchanged, with line 2 shown as 'b' removed followed by 'x' added — exactly the one line that differs.
Frequently asked questions
Does it compare word-by-word or character-by-character?
No — it compares whole lines. A single character change anywhere on a line marks that entire line as removed-then-added, not just the changed character.
Why does a replaced line show as removed then added, instead of a single "changed" marker?
Line-based diffing only knows whether a whole line matches another whole line elsewhere in the other text; it has no built-in idea of a partial edit, so a modified line is represented as its old version disappearing and its new version appearing.
Does line order matter?
Yes — moving a block of unchanged lines to a different position in the file shows them as removed from the old position and added at the new one, since the algorithm compares sequences in order.
Is my text uploaded anywhere?
No — the comparison runs entirely in your browser; neither text is sent to a server.
Related tools
Count words, characters, sentences and paragraphs instantly, with an estimated reading time.
Case ConverterConvert text between UPPER, lower, Title, Sentence, camelCase, snake_case and kebab-case.
Markdown PreviewerLive side-by-side Markdown editor and preview — headings, lists, links, code and tables.