跳到主要内容

Text Diff Checker

Original Text

Updated Text

1
Added
0
Removed
1
Changed
2
Unchanged

Diff Result

Old #
Original
New #
Updated
—
1
Added
line zero
1
line one
2
Unchanged
line one
2
line two
3
Changed
line four
3
line three
4
Unchanged
line three

import 'github-markdown-css'

What does the text diff tool do?

This tool compares two blocks of text line by line. Put the old version on the left and the new version on the right, and the page summarizes:

  • added lines
  • removed lines
  • paired changed lines
  • unchanged lines

The implementation is optimized for readable line-level review, not character-level highlighting. It first aligns content with a longest common subsequence (LCS) pass, then pairs nearby remove and add chunks into changed rows when possible. That makes it useful for copy review, config changes, logs, and API snapshots.

The tool also normalizes and to , so text copied from different operating systems is compared on the same newline basis.

Good fits

  • reviewing API response snapshots
  • checking copy revisions
  • auditing config edits
  • comparing prompt versions or log excerpts

References