Text Diff Tool

Compare two texts and highlight the differences between them.

Paste your original and modified text below to see a detailed comparison. This tool highlights added, removed, and changed lines with colour coding.

All processing happens in your browser - your text is never sent to our servers.

0 lines
0 lines

How to Use the Text Diff Tool

  1. Paste Original Text: Enter the original version of your text in the left text area.
  2. Paste Modified Text: Enter the modified version in the right text area.
  3. Configure Options: Select any comparison options you need:
    • Ignore whitespace - Ignores differences in spaces and tabs
    • Ignore case - Treats uppercase and lowercase as the same
    • Inline diff view - Shows changes in a single column instead of side-by-side
  4. Click Compare: Press the "Compare" button to see the differences.
  5. Review Results: Added lines appear in green, removed lines in red, and changed lines in yellow.
  6. Export: Copy the diff or export it as HTML or plain text.

Understanding the Diff Output

The diff tool uses colour coding to highlight different types of changes:

  • Green (Added) - Lines that exist in the modified text but not in the original
  • Red (Removed) - Lines that exist in the original text but not in the modified
  • Yellow (Changed) - Lines that exist in both texts but have been modified
  • Grey (Unchanged) - Lines that are identical in both texts

Common Use Cases

  • Comparing code revisions
  • Reviewing document changes
  • Checking configuration file differences
  • Verifying data migration accuracy
  • Proofreading edited documents
  • Comparing API responses
  • Validating template modifications
  • Tracking content updates
Frequently Asked Questions

A text diff tool compares two pieces of text and highlights the differences between them. It shows which lines have been added, removed, or changed, making it easy to identify modifications between two versions of a document, code, or any text content.

The line-by-line comparison splits both texts into individual lines and compares them sequentially. Lines that exist only in the original text are marked as removed (red), lines only in the modified text are marked as added (green), and lines that differ between versions are marked as changed (yellow).

Side-by-side view shows the original and modified texts in two columns, making it easy to compare corresponding lines. Inline diff view combines both texts into a single column, showing deletions and additions in sequence, which is useful for seeing the exact flow of changes.

The "Ignore whitespace" option treats lines with different spacing (tabs, spaces, indentation) as identical if their visible content matches. The "Ignore case" option treats uppercase and lowercase letters as the same, so "Hello" and "hello" would be considered identical.

Yes, all text comparison is performed entirely in your browser using JavaScript. Your text is never sent to our servers or stored anywhere. This makes the tool completely private and secure for comparing sensitive documents.
Related Tools
Tips
  • Use Ignore whitespace when comparing code with different indentation styles.
  • Use Ignore case for case-insensitive text comparison.
  • The inline view is useful for documents with many changes.
  • Click Swap to quickly exchange original and modified texts.
  • Export as HTML to share coloured diff results.
Keyboard Shortcuts
Ctrl + Enter Compare texts
Ctrl + Shift + C Copy diff result