Diff Checker

Compare two texts and see the differences highlighted. Perfect for code review and document comparison.

Original Text
The original/old version
Modified Text
The new/modified version
Differences

Click "Compare" to see differences

What is Diff?

A diff (short for difference) shows the changes between two versions of text. It's commonly used in version control systems like Git to track modifications to code or documents.

How Diff Works

The diff algorithm compares two texts and identifies:

  • Added lines - New content that wasn't in the original
  • Removed lines - Content that was deleted
  • Unchanged lines - Content that remains the same

Diff Types

Line Diff

Compares text line by line. Best for code and structured text.

Word Diff

Compares individual words. Better for prose and documents.

Character Diff

Compares character by character. Most detailed comparison.

Understanding the Output

| Symbol | Meaning | |--------|---------| | + | Line added | | - | Line removed | | (no symbol) | Line unchanged |

Use Cases

  • Code review - See what changed in a commit
  • Document comparison - Track edits in documents
  • Configuration changes - Verify config file updates
  • Data validation - Compare expected vs actual output
  • Debugging - Find differences in test outputs

Options

Ignore Whitespace

Skip differences that are only whitespace changes.

Ignore Case

Treat uppercase and lowercase as the same.

Trim Trailing Whitespace

Ignore whitespace at the end of lines.