Text Diff Checker

Paste your original and changed text below to see exactly what was added, removed, and changed — line by line, word by word.

Paste or type text in both boxes to see the differences.

What a text diff checker actually does

A diff answers one question: between two versions of the same text, what stayed the same, what disappeared, and what is new? That is harder than it looks, because both versions are just streams of characters — the tool first has to work out which lines correspond to each other before it can label anything. This kind of line-by-line comparison is the everyday backbone of proofreading a rewritten paragraph, spotting which settings changed in a config file, redlining a contract against last week's draft, or checking an edit that someone else made to your copy.

How the comparison is built

Paste the earlier version on the left and the newer version on the right, then press Compare. The tool splits each side into lines and searches for the longest common subsequence (LCS) — the longest ordered set of lines that appears in both versions, even if other lines sit between them. Those matched lines become the shared skeleton. Any original line that is not on the skeleton is a removal; any changed line that is not on it is an addition. When a removal and an addition land on the same spot, the tool drops one level deeper and compares those two lines word by word, so you see the exact words that were swapped instead of a whole line simply flashing red and green.

Reading the result

Row styleMarkerMeaning
Removed (red)Line exists only in the original
Added (green)+Line exists only in the changed text
Unchanged(none)Line is on the shared skeleton, identical in both
Edited line− and +Line matched, but its words differ — changed words are struck through or underlined

Worked examples

Example 1 — a single-word edit. Original: "Meeting at 3pm." / "Bring the report." Changed: "Meeting at 4pm." / "Bring the report." The first line matched but differs, so it shows as one removed and one added row with 3pm struck through and 4pm underlined; the second line is unchanged. Totals: Removed 1, Added 1, Unchanged 1.

Example 2 — an inserted line. Original has three lines: A, B, C. The changed text is A, B, new line, C. All three original lines stay on the skeleton, so the only difference is the inserted line: Added 1, Removed 0, Unchanged 3.

Example 3 — the effect of Ignore case. Original: "TODO: refactor", changed: "todo: refactor". With Ignore case off, the line counts as one removal and one addition. Turn Ignore case on and the tool reports "No differences" — the only change was capitalization.

Options and what they change

OptionOff (default)On
Ignore case"Hello" and "hello" are different linesCase is ignored when matching lines and words
Ignore trailing whitespaceTrailing spaces and tabs count as contentEnd-of-line spaces are stripped before comparing

Both options only change how lines are matched — the characters you pasted are always shown untouched in the result.

Common mistakes and limits

Sources & further reading

Frequently asked questions

How does this text diff checker compare two pieces of text?

This tool splits both texts into lines and finds the longest common subsequence (LCS) — the longest run of lines that appear in the same order in both versions. Everything outside that shared backbone is marked as removed from the original or added in the changed text. For example, changing 'The quick brown fox' to 'The quick red fox' on one line marks that single line as changed, with 'brown' struck through and 'red' inserted, while every unrelated line above and below stays marked unchanged.

What do the colors and the + and − symbols mean in the result?

A red row with a leading − marks a line that only exists in the original text and was removed. A green row with a leading + marks a line that only exists in the changed text and was added. Rows with no symbol and no color are unchanged lines that appear in both versions. When a line is edited rather than fully removed or added, the specific words that differ inside it are struck through or underlined, so you can see exactly which words changed, not just that the line changed.

How do the ignore case and ignore trailing whitespace options work?

Ignore case treats 'Hello' and 'hello' as the same line or word, which is useful when comparing text that only differs in capitalization. Ignore trailing whitespace removes invisible spaces and tabs at the end of each line before comparing, which helps with code or exported text where an editor added trailing spaces that don't change the meaning. Both options only affect how lines are matched — the characters you actually typed are always shown in the result.

Is there a limit to how much text I can compare?

Yes — each box supports up to about 2,000 lines or 200,000 characters, which covers most articles, emails, config files and short scripts. If either box goes over that limit the comparison is skipped and a warning appears instead of a result, so the page doesn't freeze on a very large paste. For anything longer, compare the text in smaller sections.

Is my text uploaded to a server when I compare it?

No. Both text boxes are compared entirely inside your browser using JavaScript — nothing you paste is uploaded, logged or sent to a server. The only thing saved is a local copy in your own browser's storage, so your text and options are still there if you come back to this tab, and you can remove it any time with the Clear button.