SummaryLog

Diff Viewer

Compare two texts line by line with highlighted differences.

This tool compares two blocks of text and shows exactly what changed between them. It uses a longest common subsequence (LCS) algorithm, the same approach behind Git diffs, so it aligns matching lines and marks only the real insertions and deletions instead of flagging every line after the first change.

Paste an original and a modified version, then read the result line by line: added lines are green, removed lines are red, and unchanged lines stay neutral. Each row shows its old and new line numbers, making it easy to review config edits, proofread document revisions, or check what a code snippet actually changed.

How to use

  1. Paste the original text into the left Original box.
  2. Paste the updated text into the right Modified box.
  3. Click Compare to run the line-by-line diff.
  4. Read the output: + green lines were added, - red lines were removed, and the Old and New columns show line numbers in each version.
  5. Click Copy to copy the result as a unified-style diff (+/- prefixes) for pasting into a ticket, email, or commit note.

FAQ

Is my text sent to a server?
No. The comparison runs entirely in your browser with JavaScript. Neither the original nor the modified text leaves your device, so it is safe for private documents and proprietary code.
Does it compare line by line or character by character?
It compares line by line. Each line is treated as a unit, so changing any part of a line marks the whole line as removed and the new version as added. Splitting text into shorter lines gives more granular results.
What do the Old and New columns mean?
Old is the line number in the original text and New is the line number in the modified text. Removed lines have only an Old number, added lines have only a New number, and unchanged lines show both.
Why are some lines marked changed when they look the same?
Trailing spaces, tabs versus spaces, or different line endings make lines unequal even when they look identical. The diff matches lines exactly, so invisible whitespace differences will show up as a removal plus an addition.
What format does the Copy button produce?
It copies a unified-style text diff: added lines are prefixed with +, removed lines with -, and unchanged lines with a space. This pastes cleanly into pull request descriptions, code reviews, or chat.