nwork

Text Diff Checker

Compare two texts side by side and see exactly what changed. Lines added, removed and unchanged are highlighted clearly.

Paste text in both boxes above to compare

How to Use

  1. 1

    Paste original text

    Add the original version of your text in the left box.

  2. 2

    Paste modified text

    Add the updated version in the right box.

  3. 3

    View the diff

    Changed lines and words are highlighted — red for removed, green for added.

  4. 4

    Toggle view or copy

    Switch between split and unified view, or copy the diff as text.

How It Works

This tool compares two blocks of text line by line and highlights exactly what was added, removed, or unchanged between them — the same core technique version control systems like Git use to show what changed in a file.

The Longest Common Subsequence approach

Rather than naively comparing text line-by-line in fixed positions (which breaks the moment a single line is inserted or deleted, shifting everything after it), the diff algorithm finds the longest sequence of lines common to both texts, then reports everything else as an addition or deletion relative to that shared backbone — the same method Git and most diff tools use under the hood.

Examples

Comparing two drafts

Pasting an original paragraph and a revised version instantly highlights exactly which sentences were changed, added, or removed — without manually re-reading both versions side by side.

Checking a config file change

Comparing an old and new configuration file quickly reveals which specific lines changed, even if unrelated lines shifted position due to additions elsewhere in the file.

Common Use Cases

  • Comparing two versions of a document, contract, or article to spot exactly what changed
  • Checking configuration or code file differences without a full version control setup
  • Reviewing edits from a collaborator or editor to see precisely what they changed

Tips

  • For very large files (1000+ lines), the comparison may run slightly slower since the underlying algorithm's complexity grows with input size — for huge files, consider comparing in smaller sections.
  • The diff is line-based, not word-based — if you need to see exactly which words changed within a single long paragraph that wasn't split into separate lines, breaking the text into shorter lines first will give a more granular comparison.

Frequently Asked Questions

Related Tools