Text Diff

How Text Diff Works

The diff algorithm finds the longest common subsequence and identifies changes.

  1. 1

    Split texts into lines

    Both input texts are split into individual lines for comparison.

  2. 2

    Compute differences

    A longest common subsequence algorithm identifies which lines are added, removed, or unchanged.

  3. 3

    Highlight changes

    Added lines are highlighted in green, removed lines in red.

FAQ

How does text diff work?
The diff tool compares two texts line by line and character by character, highlighting added, removed, and unchanged sections.

Related Tools