piapia123
en

Text Diff

Text

Everything runs locally in your browser — nothing is uploaded

ORIGINAL
REVISED
DIFF

Fill in both sides to compare

Click a row to copy that line; drag to copy several (line numbers stay out of it)

Put two versions of a text side by side and see exactly which lines changed, which were added and which were removed. Edits are aligned by minimal difference (longest common subsequence) rather than marking whole blocks as changed. Handy for config files, logs, code snippets and copy revisions.

Features

  • Line-by-line comparison marking added, removed and unchanged lines
  • Edits aligned by minimal difference (LCS), not whole-block marking
  • Side-by-side panes with line numbers matching each original
  • CRLF and LF line endings treated as identical — no walls of false diffs
  • Optionally ignore case, trailing/repeated whitespace, or all whitespace including indentation
  • With an ignore option on, the counts say how many lines differ only in what you ignored, so identical never quietly lies
  • Very large inputs degrade gracefully with an explicit notice instead of freezing

How to use

  1. Paste the original on the left and the revision on the right
  2. The comparison updates as you type — no button needed
  3. Green marks additions, red marks deletions, grey is unchanged

FAQ

The two texts look identical but a diff is reported. Why?
Usually trailing whitespace, indentation or case — real differences, just hard to spot by eye. The three checkboxes on the left of the toolbar exist for exactly this: tick ignore trailing space or ignore all whitespace and the false differences vanish. CRLF vs LF is already ignored. Note that with an ignore option on, the stats still report how many lines differ only in what you ignored — those differences did not disappear, they were excluded at your request, and replacing the left side with the right will still overwrite that case and spacing.
How are the changes aligned?
A longest common subsequence algorithm finds the largest matching run between the two sides and treats the rest as insertions and deletions. That means only genuinely changed lines are marked, instead of everything after the first difference.
What happens with very long texts?
Diffing is O(n×m), so very large inputs fall back to a coarse "all removed, then all added" result. The page says so explicitly when that happens — the output is still correct, just not aligned to the minimal edit.

Related tools