Skip to main content
DevTools24

Text Diff

Compare two texts and visualize differences with word-level or line-level highlighting.

Legend:
AddedRemovedUnchanged

Text Diffing - Technical Details

Diff algorithms find the minimum set of changes between two texts. Green indicates additions, red indicates deletions. Word-level diff is more granular, line-level is better for code.

Command-line Alternative

// Diff output format\n- Removed line (red)\n+ Added line (green)\n  Unchanged line\n\n// Git uses unified diff format