πŸ”€

Text Diff Viewer

Compare two blocks of text and see additions, deletions, and unchanged lines highlighted. Powered by the Myers diff algorithm.

Original (A)
Modified (B)
Diff Output
Paste text in both boxes above to see the diff

About Text Diff Checker

This tool compares two blocks of text using the Myers diff algorithm and renders a side-by-side view with line-level additions highlighted in green and deletions in red. Enable the "Inline word diff" option to also see exactly which words within a changed line were added or removed.

All comparison happens entirely in your browser β€” no text is uploaded to any server. It is useful for developers, writers, and anyone who needs to compare two versions of a document without installing any software.

Common Use Cases

How to Use

  1. Paste your original text into the left "Original (A)" panel
  2. Paste your modified text into the right "Modified (B)" panel
  3. The diff updates automatically β€” red lines were removed, green lines were added
  4. Toggle "Inline word diff" to see character-level changes within modified lines, or "Ignore whitespace" to skip formatting-only differences

Frequently Asked Questions

What is the Myers diff algorithm?

The Myers algorithm is the standard diff algorithm used by Git and most version control systems. It finds the shortest edit script β€” the minimum number of insertions and deletions β€” needed to transform one text into another, producing the most human-readable diff output.

Can I compare code files or JSON?

Yes. Paste any plain text β€” source code, JSON, YAML, SQL, or prose. For JSON, it is best to format both sides consistently first (use the JSON Formatter tool) so the diff reflects logical changes rather than cosmetic whitespace differences.

What does "Ignore whitespace" do exactly?

When checked, lines that differ only in leading/trailing spaces or tab indentation are treated as identical. This is useful when comparing code that was re-indented or reformatted without any logical changes, so you see only meaningful differences.

Advertisement