Developer Tools

Text Diff Checker

Paste an original and revised version to see a line-oriented diff that is useful for config files, code snippets and document edits.

Added lines2
Removed lines1
alpha
+beta changed
−beta
gamma
+delta

How this tool works

The tool computes a longest-common-subsequence table for the two line arrays, then reconstructs unchanged, inserted and removed lines.

Example

Changing one line and appending another produces one removed line, two added lines and the unchanged surrounding lines.

Common questions

Is this a character-by-character diff?

No. It compares lines, which is usually clearer for source code and configuration text.

How large should the inputs be?

The LCS algorithm uses memory proportional to the product of line counts, so very large files are better handled by dedicated diff software.