Text Diff

Compare any two texts and see exactly what changed.

Your data is processed entirely in your browser and is never uploaded.

Tool workspace

ORIGINAL · A
Status: Empty0 chars
MODIFIED · B
Status: Empty0 chars

Live diff is on — differences appear as you type.

DIFF
Output: Empty

$ diff a.txt b.txt

Paste two texts above, or load the sample, and the differences render here, line by line, the instant they change. Logs, configs, code, markdown, env files, SQL. Any text.

HOW IT WORKS

Compare text in three steps

Paste both sides

Original in A, modified in B. Any text works: logs, configs, code, markdown. The diff runs as you type.

Read the changes

Additions in teal, deletions in red, changed lines facing each other. Toggle unified for a single column.

Tune & export

Ignore whitespace or case to cut noise, then copy or download the unified patch.

Docs · Compare

A diff sees lines, not structure

Text Diff compares two texts line by line and reports which lines were added, removed, or changed. It has no idea what the text means: logs, configs, code, markdown, env files, SQL, CSV, so it is equally at home on all of them. The engine aligns the two sides to keep as many unchanged lines matched as possible, pairs a removed line with an added line that replaces it, and leaves the rest as pure additions or deletions. You can render the result side-by-side (additions teal, removals red) or as a single unified column you can copy or download as a patch, ignore whitespace or case to cut noise, and read a similarity score that tells you at a glance how much the two sides share. The diff runs live as you type, in a background worker for large inputs.

Things to know

Changed lines face each other

When a line is removed and another added in the same place, the diff pairs them onto one row so you can read the before/after at a glance, instead of scrolling a delete block against an insert block.

Reordering is remove + add, not a move

The diff aligns identical lines, so it can't see that a line just moved elsewhere. It reports the old spot as removed and the new spot as added. Text is compared line by line; if you need structure-aware moves, JSON Diff compares parsed data instead.

Ignore whitespace / case for reviews

Toggling ignore-whitespace or ignore-case silences cosmetic noise so a review reads the real change: trailing spaces, a full file re-indented, or a headline retyped in a different case no longer flood the diff.

Very large inputs switch to Compare

Live diffing runs as you type up to a combined size, then the button becomes the explicit 'Compare' so a giant paste never hitches the page. Press it and the worker takes over; results cap at 20,000 rendered lines.

What the similarity score means

It's the share of identical lines on both sides, as a percentage of all lines involved. 100% means identical; 0% means nothing in common. A small edit next to a big block lands somewhere high.

Try these

A line changed
env = staging
replicas = 2
region = us-east-1
=====A|B=====
env = production
replicas = 2
region = us-east-1

Two configs where one value differs. The changed line faces its pair.

Lines added
# service config
env = staging
replicas = 2
=====A|B=====
# service config
env = production
replicas = 4
log_level = info
debug = true

B gains a log_level line and a debug flag. Both report as added.

Line removed
name = Ada
role = engineer
level = 7
=====A|B=====
name = Ada
role = engineer

A has a line B dropped. It shows as removed with an empty slot facing it.

pair this withDiff structured JSON → JSON Diff·Extract patterns first → Regex Tester·Compare encoded payloads → Base64 Encode / Decode

FAQ

Frequently asked questions

Is either text uploaded?

No. The comparison runs entirely in your browser, in a background worker for large inputs. Neither side ever leaves your machine.

What kind of text can I compare?

Any text. Log files, config files, code, markdown, environment files, SQL, CSV. The diff works line by line, so it doesn't matter what the text is. If you're comparing two JSON documents, the dedicated JSON Diff tool has the same engine with JSON framing.

Why do some changed lines face each other?

When a line is removed and another added in the same place, the diff pairs them onto one row so you can read the before/after at a glance, instead of scrolling a delete block against an insert block.

What does the similarity score mean?

It's the share of lines that are identical on both sides, as a percentage of all lines involved. 100% means identical; 0% means nothing in common.