Skip to main content
Back to tools

Text Diff

Compare two texts and highlight line-by-line differences

About Text Diff

Compares an original and a modified text line by line after you click Compare, then shows the whole text in one unified view with additions and removals marked and a count of each. Only the first 300 lines of each side are compared, and everything runs in your browser. Useful for checking config edits, log output or two versions of a snippet.

Category: Text.

Frequently asked questions

What diff algorithm is used?

▾

A line-by-line comparison based on the longest common subsequence (LCS), computed with a dynamic-programming table. It finds a minimal set of added and removed lines, but it isn't git's Myers implementation, so changes may occasionally be aligned differently than in git diff.

What do the colors mean?

▾

Red lines (−) were removed — present in the left/original text but not in the right. Green lines (+) were added — present in the right/new text but not in the left.

Can I compare code files?

▾

Yes. Paste any text content including code. The diff is purely text-based with no language-specific parsing.

Does it ignore whitespace or highlight changes within a line?

▾

No. Lines are compared exactly, including case, indentation and trailing spaces, and a line that changed in any way appears as a removed line plus an added line, with no word- or character-level highlighting.

Related tools