Text Diff Comparison

Compare two blocks of text line by line and see added and removed lines highlighted in color. Useful for checking config file changes, proofreading documents, or reviewing code without Git. All diffing happens in your browser; nothing you enter is sent to a server.

Tips

  • Paste the before and after versions of a config file (.env, YAML, JSON, etc.) to instantly see which lines were added or removed.
  • Even without Git installed, you can do a lightweight code review or proofread a document just by copy-pasting two versions.
  • A line that simply moved to a different position is detected as a removal plus an addition, not as a "move" — keep this in mind when reading the result.
  • Whitespace, line breaks, and letter case are all compared strictly, so a line that only changed its indentation will still show up as changed.
  • When comparing long prose, putting one paragraph per line before pasting makes the diff easier to read at a glance.

Frequently Asked Questions

It helps you spot line-level changes in configuration files or documents, review code without Git, or check revisions in a contract or terms of service — anywhere you need to see what changed between two versions of plain text.

The CSV diff tool matches rows by a key column and compares cell by cell in structured tabular data. This tool instead compares free-form text line by line, with no notion of columns — it suits config files and prose rather than tables.

The JSON diff tool parses the JSON structure (objects and arrays) and compares by key. This tool does not parse any structure at all — it simply treats each line as a string, so it works on any plain text, not just JSON.

Reordered lines are not detected as a "move." Instead they show up as a removal from the old position and an addition at the new position. This is the same behavior you get from Git's diff command and most general-purpose line diff algorithms.

No. The entire diff calculation runs in your browser's JavaScript, and none of the text you enter is ever transmitted to a server — so it is safe to use even with sensitive content.
ツールくん

Side Note — how LCS (Longest Common Subsequence) powers text diffing

The best-known algorithm for detecting differences between two texts is the "Myers diff algorithm," published in the 1970s by computer scientist Eugene Myers at IBM. The `diff` command in major version control systems like Git and SVN is built on this family of algorithms, efficiently detecting line-level additions and removals. This tool follows the same underlying idea, computing the Longest Common Subsequence (LCS) to narrow the result down to a minimal set of changes.

The Longest Common Subsequence (LCS) is the longest sequence that appears, in order, in both of two sequences being compared — here, the sequence of lines. The diff between two texts is found by treating every line not part of this LCS as either "removed" or "added"; the longer the LCS, the fewer changes appear on screen. A technique called dynamic programming (DP) makes this calculation practical even for texts with many lines.

Diff algorithms have a known weakness: when a line simply moves to a different position, most implementations do not detect it as a "move" — they show it as a removal paired with an addition instead. This is why comparing texts whose line order has been heavily shuffled can make the diff look larger than the actual change. Knowing this quirk helps you read diff results without being misled.

→ Browse all trivia