Text Diff / Compare

Compare two texts to quickly spot additions and deletions.

Original Text

New Text

Comparison Result

Original text view...
New text view...

About This Tool

The Text Diff Tool visually highlights the differences between two blocks of text. It acts similar to 'git diff', showing exactly what was added or deleted. It operates entirely locally without sending your sensitive code to any server.

When to Use

  • Comparing two versions of a code snippet to see what changed.
  • Reviewing a document or article to spot grammatical corrections.
  • Finding subtle differences between similar configuration files.
  • Checking the output of a regular expression replace function.

Practical Examples

By Line ExampleCompares massive log files chunk by chunk.
By Word ExampleIdeal for short paragraphs where just a single word changed.

Common Mistakes to Avoid

  • Comparing heavily minified (1-line) files in 'By Line' mode makes it impossible to see the exact change. Format files first, or use 'By Word' mode.

Frequently Asked Questions

Q. What's the difference between Split and Unified view?A. Split view places the original on the left and the new version on the right (ideal for wide screens). Unified merges them together vertically like a standard Github diff.
Q. Is my text data private?A. Yes. All computations are done safely in your browser.

Related Tools