Text Diff Checker
Compare two text blocks and highlight differences line by line. See additions, deletions, and unchanged lines with color-coded output.
Compare two text blocks line by line and see exactly what changed. Perfect for comparing code, documents, or any text.
Compares text line by line using LCS algorithm. Processes up to 200,000 characters per input. All processing is done locally in your browser.
How to Use This Tool
- 1
Paste original text
Paste the original version of your text in the left input area.
- 2
Paste modified text
Paste the updated or modified version in the right input area.
- 3
Set comparison options
Optionally enable Ignore case or Trim whitespace for flexible comparison.
- 4
Review the diff
See color-coded results: green for added lines, red for removed lines, and line numbers for easy reference.
Frequently Asked Questions
- What algorithm is used for comparison?
- This tool uses the Longest Common Subsequence (LCS) algorithm, similar to Unix diff. It finds the optimal alignment between the two texts.
- Can I compare code files?
- Yes! This tool works great for comparing code, configuration files, JSON, CSV, or any line-based text format.
- What does the Swap button do?
- Swap exchanges the original and modified text. This is useful when you want to see the diff from the opposite perspective.
- Is there a size limit?
- Each input supports up to 200,000 characters. For very large files, consider using dedicated diff tools like VS Code or Git diff.