Text diff (by line)

Text diff (by line)

Line-by-line diff between two texts

Computed in your browser

Put old text on the left and new text on the right. Minus marks deletions and plus marks additions. Each side is limited to 2,000 lines.

 

Example

Input

Left:  alpha
beta
Right: alpha
gamma

Example result

  alpha
- beta
+ gamma

Minus marks old text from the left; plus marks new text from the right.

Technical details & limits

Longest common subsequence (LCS) aligns lines, with time and memory growing with the product of the two line counts. Each side is capped at 2000 lines. It does not detect semantic equivalence, moved blocks or JSON-key reordering; an edit normally appears as one removal and one addition.

About this tool

Compare two texts line by line with added, removed and unchanged markers. Optional case and trailing-whitespace rules help inspect configuration changes, API fixtures and text revisions locally.

Use cases

  • Quickly see the difference between two config files.
  • Compare two log runs to find newly appearing errors.

How to use

  1. Paste the two texts into the left / right boxes.
  2. The diff appears below. Toggle options to change comparison rules.

Notes

This is a line-level diff — similar-but-different lines show as removed+added rather than as small edits.

FAQ

What if equivalent JSON shows many differences?
Format both documents with the same indentation and check key order. This tool compares text lines, not the logical meaning of JSON.
Does ignoring whitespace ignore spaces inside a line?
No. The current option ignores trailing whitespace only; leading and internal spaces are still compared.
Is there an input-size limit?
Each side is limited to 2000 lines. Extract the relevant time range or module from larger logs first.
What changes when I swap the two sides?
The direction reverses: additions become deletions and vice versa. Decide which text is the old version before interpreting the changes.

Related tools

Text diff (by line) · Line-by-line diff between two texts
Text diff (by line) — Tool illustration · dayeku.com