Text Utilities

Text Diff Viewer

Line-by-line diff using LCS algorithm. Additions in green, deletions in red — click Compute to compare.

0 lines
0 lines
Enter two texts and click Compute Diff.

How to use this tool

  1. Paste the original text into Original Text and the revised text into Modified Text.
  2. Click Compute Diff to compare the two versions.
  3. Read the result — lines marked + in green are additions, lines marked - in red are deletions, and dim lines are unchanged.
  4. Check the summary below the output for the total number of additions and deletions.
  5. Use Copy on either input, or Copy Diff on the result, to copy to your clipboard.
  6. Click Clear All to reset both inputs and the diff output.

Why this tool is helpful

Review code changes

Paste the before and after of a function or file to see exactly which lines were added, removed, or kept — no IDE or diff viewer required.

Compare config versions

Diff two versions of a .env, JSON, or YAML file to spot keys that were added or removed between releases.

Reconcile logs & build output

Diff two runs of logs or CI output to quickly find the new lines that appeared — and the old ones that disappeared.

Track document edits

See exactly what changed between drafts of docs, release notes, or any plain-text file with a clean additions/deletions breakdown.

Stay private

Everything runs in your browser. Your text is never uploaded, logged, or sent to a server — safe for sensitive source and payloads.

FAQ

What does this tool do?

It compares two blocks of text and shows a line-by-line diff. Lines present only in the modified text appear in green as additions, and lines present only in the original appear in red as deletions. Unchanged lines stay dim.

How does the comparison work?

It uses a Longest Common Subsequence (LCS) algorithm. The algorithm finds the longest sequence of lines the two inputs share in order, then everything else is reported as an addition or a deletion.

Does it compare line-by-line or word-by-word?

Line-by-line. Each line is treated as a single unit, so a one-word change flags the whole line. It does not do character- or word-level highlighting.

Why does a small edit highlight the entire line?

Because the comparison granularity is the line. If even one character differs, the old line is shown as a deletion and the new line as an addition.

Does the order of lines matter?

Yes. The diff is positional, so moving a line counts as deleting it in one place and adding it in another. Keep both inputs in the same sequence for the clearest result.

Does any of my data leave my browser?

Never. All comparison happens locally in JavaScript. Your text is not sent to, stored on, or logged by any server.