EN

Text Diff

Side-by-side line diff with add/delete highlight

FAQ

Side-by-side or unified view?

Side-by-side puts the two versions in columns so changes line up visually. Unified lists added and removed lines in reading order, better for small edits.

How much text can it handle?

Keep the two line counts multiplied under 4 million (roughly 2000 × 2000). A line-level diff builds an n×m table, and beyond that the tab would hang, so the run is stopped with a message. Split larger files into sections.

Is the content uploaded?

No, everything is computed locally in your browser.

About this tool

The algorithm is line-level LCS (longest common subsequence): both sides are split into lines and compared, matching lines align, and lines present on only one side are marked added or removed. The benefit is pinpointing which lines actually changed instead of highlighting whole regions; the cost is an n×m table, so once the line counts multiply past 4 million (roughly 2000 × 2000) the run is stopped with a message rather than hanging the tab.

Two views for two purposes: side-by-side puts versions in columns so changes line up visually; unified lists added and removed lines in reading order with - / + markers, which pastes well into chat or tickets. The header reports added, removed and unchanged line counts, a faster read on scale than eyeballing.

Comparison is character-exact: a trailing space, a re-indent from 2 to 4 spaces, or CRLF versus LF all count as different lines. Copy a block from Notepad and another from an editor and everything looks changed — normalise line endings first. There is no word-level highlighting either: change one character in a line and the whole line is still marked added or removed.

A trailing newline adds an empty line to the comparison, which explains most "identical but one difference" reports. Nothing is uploaded — the work happens in your browser, so comparing internal configs or key fragments is safe.