DEV

Code Diff Checker

Paste the original on the left and the changed version on the right to see a line-by-line comparison.

ORIGINAL
CHANGED

How it works

This compares the two blocks line by line using a longest-common-subsequence algorithm — the same family of technique behind tools like git diff. Lines present in both appear unchanged; lines only in the original are marked removed; lines only in the changed version are marked added.

It matches whole lines exactly, so a single changed character will mark the entire line as changed rather than highlighting just that character.

Frequently asked

Does this show word-level or character-level changes?

No — comparison is line by line. If one word changes in an otherwise identical line, that whole line shows as removed-then-added rather than highlighting just the word.

Does whitespace matter?

Yes — lines are compared exactly as typed, so a trailing space or different indentation will show as a difference even if the code would otherwise be identical.