Text Diff

Compare two texts line by line with LCS and copy the diff

Diff result

How to Use

What changed between this config and the last version? Where do two logs differ? Which lines did the merge conflict touch? Scanning by eye misses things. This tool performs a line-level comparison using the Longest Common Subsequence (LCS) algorithm and outputs a standard diff: lines starting with "- " were removed from the left text, lines starting with "+ " were added on the right, and lines starting with two spaces are unchanged context.

How to use: paste the original text on the left and the modified text on the right, then click "Compare" to see the diff plus a summary of unchanged, added and removed lines. Case and trailing whitespace can be ignored via the checkboxes, and "Swap Sides" flips the two texts in one click. Inputs beyond 800 lines are stopped with a friendly notice to keep the browser responsive, and everything runs locally, so sensitive content never leaves your device.

FAQ

What do the symbols in the diff result mean?

Lines starting with "- " were deleted from the left (original) text, lines starting with "+ " were added on the right (modified) text, and lines starting with two spaces are unchanged context, matching the standard diff format.

What do "Ignore case" and "Ignore trailing whitespace" do?

When checked, lines are normalized before comparing: case is lowercased, and trailing spaces or tabs at line ends are stripped. The result still shows the original lines; they are just no longer counted as differences.

Will very long texts freeze the page?

The algorithm scales with the product of the two line counts. To keep the browser responsive, comparison stops with a notice when either side exceeds 800 lines; trim the texts to the relevant part before comparing.