Text Diff Tool - Compare Two Texts with Color Highlighting

Compare two texts and highlight additions, deletions, and changes in color. Supports line-level and character-level diff modes, and unified or side-by-side view.

How to Use

  1. Select 'Line' or 'Character' diff mode
  2. Select 'Unified' or 'Side by Side' view mode
  3. Enter the original text in 'Text A (original)'
  4. Enter the modified text in 'Text B (modified)'
  5. Click 'Compare' to display differences color-coded (green = added, red = removed)

Usage Examples

Line-level diff:
A: Old version of code
B: Modified code
→ Added and removed lines are visible at a glance
Character-level diff:
A: the quick brown fox
B: the slow brown fox
→ Changed characters are highlighted
Comparing config file versions:
Quickly compare two versions of a config file without using Git.

FAQ

Is my data sent to a server?
No. All diff computation is done in JavaScript within your browser. Sensitive data can be compared safely.
When should I use line vs character mode?
Use 'Line' mode for code or markdown changes. Use 'Character' mode to spot fine edits within paragraphs.
What is the difference between unified and side-by-side view?
Unified view shows additions and deletions in a single area. Side-by-side shows the original on the left and the modified text on the right.
How much text can it handle?
It depends on browser memory, but thousands of lines work fine. For very large files, consider using a command-line diff tool.
Does line ending (CRLF/LF) affect the diff?
Mixed line endings (Windows CRLF vs Unix LF) may appear as differences. It is recommended to normalize line endings before comparing.

Related Tools

Update History

Last Updated: 2026-02-20

  • 2026-02-20 Initial release