Text Comparer
Compare two texts and highlight differences with character or word-level granularity
1. What is text comparison?
Text comparison (or diff) is a tool that identifies and highlights changes between two pieces of text. It shows what was added, removed, or kept the same, making it easy to spot differences between documents, code versions, or any text content.
2. How does it work?
This tool uses the Longest Common Subsequence (LCS) algorithm to compute differences between two texts. It highlights additions in green and deletions in red with strikethrough, providing a visual representation of changes.
Diff Modes
- Word Level - Compares text word by word, better for natural language and general text
- Character Level - Compares character by character, more granular for precise changes
Statistics
- Additions - Content that exists in the modified text but not in the original
- Deletions - Content that was removed from the original text
- Unchanged - Content that remains the same in both texts
3. Examples
Common Use Cases
Code review, document comparison, text editing history, detecting changes in configuration files, comparing API responses, verifying text modifications