Text Diff / Compare

Paste two versions of a text, config file or code snippet. Added lines show in green and removed lines in red, with the exact characters that changed highlighted.

Original

Changed

Differences

Paste text on both sides to compare.

How this diff works

The tool compares the two texts line by line using the Myers diff algorithm, the same approach git diff uses. It finds the smallest set of added and removed lines that turns the original into the changed version. When a removed line is directly replaced by an added one, it's shown as a modified line, and the characters that changed inside it are highlighted.

Side by side or unified?

Side by side puts the two versions in columns, which is easiest for reading prose and config files. Unified shows one column with - and + markers, like a patch or a pull request, and works better on narrow screens.

Tips