Text Diff — Compare Two Texts Line by Line

Compare two blocks of text line by line and see exactly what changed. Runs entirely in your browser using a longest-common-subsequence algorithm.

Runs 100% in your browser — nothing is uploaded.
2 added 1 removed 3 unchanged
11 Roses are red
22 Violets are blue
3−Sugar is sweet
3+Honey is sweet
44 And so are you
5+Especially in this stanza

How to use

  1. 1
    Paste the "before"

    The original text on the left side.

  2. 2
    Paste the "after"

    The changed text on the right side.

  3. 3
    Read the diff

    Added lines are green, removed lines are red, unchanged lines are grey. Line numbers match each side.

Examples

Simple text change
Input
Before: "Hello, world!"
After: "Hello, ToolVaults!"
Output
- Hello, world!
+ Hello, ToolVaults!
Line-level diff — the whole line changed, so the old one is removed and the new one is added.
Config file drift
Input
Before: 3 environment lines · After: same 3 with debug=true added and log_level changed
Output
  APP_ENV=production
- LOG_LEVEL=info
+ LOG_LEVEL=debug
  DATABASE_URL=...
+ DEBUG=true
Great for auditing what actually changed between two versions of a config.

Frequently asked

Which diff algorithm does this use?

A longest-common-subsequence (LCS) diff at the line level. Same family used by tools like Git diff, though not with the optimizations Git makes for very large inputs.

Does it work for code?

Yes — treat each line as a unit. It highlights added, removed, and unchanged lines. For fine-grained (character-level) diffs, use a code editor with a built-in diff view.

What is the max input size?

The algorithm is O(n×m) memory. Around 3,000–5,000 lines per side is comfortable; larger inputs will start to lag. For huge diffs, break them into smaller sections.

Related tools