Text Diff Checker (Compare Two Texts)

Added lines-
Removed lines-
Unchanged lines-

Differences

How the comparison works

The checker compares the two texts line by line using the longest common subsequence algorithm, the same idea behind the diff command and version control tools such as Git. Lines that appear in both versions in the same order are unchanged (shown plain). Lines only in the original are shown in red with a minus sign, and lines only in the changed text are shown in green with a plus sign. A line that was edited shows up as one removed line and one added line. You can ignore leading and trailing spaces or letter case if you only care about real changes. Everything happens in your browser, so nothing you paste is uploaded.

FAQ

Can it compare code, JSON or CSV?

Yes, any plain text works. It compares whole lines, so for JSON it helps to format both sides the same way first, for example with the JSON formatter.

Why does an edited line show as removed and added?

The comparison works per line. When a line changes at all, the old version counts as removed and the new version as added, which is how most diff tools display it.

Is my text sent anywhere?

No. The comparison runs entirely in your browser. Nothing is uploaded or stored.

Is there a size limit?

Up to 3,000 lines per side. Larger texts are cut off to keep the page responsive.

How can I tell if two texts are exactly identical?

If there are zero added and zero removed lines they match line for line. For an exact fingerprint compare you can also use the hash generator and check that the SHA-256 values are equal.

Line-based comparison. Differences inside a single line are not highlighted word by word.

See also: word counter · remove duplicate lines · case converter · JSON formatter · hash generator · all tools · Regex Tester · CSV to JSON · JSON to CSV · Markdown preview