Text Diff

Compare two pieces of text side by side

+57 / −45 chars
Diff
The quick brown fox
jumps over the lazy dog.
The quick red fox
jumps over the sleepy dog.
A new line.

How does the diff work?

The tool computes an LCS (longest common subsequence) between the two inputs and renders the differences side by side. Lines present only in 'before' are shown in red; lines only in 'after' are shown in green; matching lines stay neutral.

Within changed lines, word-level differences are highlighted so you can see exactly which token changed — useful for catching a single typo in a long paragraph or pinpointing the one number that changed in a config file.

Examples

Single word change
Input
Before:
Hello world
Goodbye sun
Output
After:
Hello world
Goodbye moon

Diff: 'sun' → 'moon' on line 2

Frequently asked questions

How big can the inputs be?

Tens of thousands of lines work fine. Diff complexity is O(n·m) so multi-megabyte inputs may slow the UI; in that case a desktop tool like `diff` or `git diff` is faster.

Does it understand JSON / code structure?

No — it's a text diff, not a structural diff. It treats inputs as flat lines. For semantic JSON diff, use a dedicated tool like `jsondiff` or `delta`.

Are whitespace differences shown?

Yes — by default. Trailing whitespace and tab/space mismatches will appear as differences. Strip them first with the Whitespace tool if you want to ignore them.

Is the diff order-aware?

Yes — lines are matched by position, not by content. Two identical lines in different positions are treated as a delete + insert.

Does anything leave my browser?

No — both inputs and the diff result stay in your tab.