Compare Two Texts and Find the Differences

This tool compares two texts line by line and prints a color-coded list: identical lines unchanged, and differing lines shown as the old version (struck through, red) and the new one (green). It suits comparing two versions of a config file, two emails, two translations or two log outputs. Note that the comparison is positional rather than an alignment algorithm, so if a line is inserted near the top of the first text, every line after it is shown as changed.

This tool runs entirely in your browser. No data is sent to any server.

How to use it

  1. 1

    Put the original in the first box and the changed version in the second.

  2. 2

    The list below builds as you type; red lines are the old text, green the new.

  3. 3

    To locate a change, take the line number from the list and open that line in your file.

Frequently asked questions

Is the comparison per word or per line?

Per line. Each line is compared with the same line number in the second text, which is precise and readable when both texts share a structure.

Why does inserting one line mark everything as changed?

Because the comparison is positional and does not align the texts. To see only real edits, keep the shared opening lines identical in both boxes.

Can I compare files?

Paste each file’s contents into the two boxes; that is exactly what it does. This version does not accept file uploads.