Text Diff Checker

Compare two versions of a text

Paste the original on the left and the changed version on the right. The comparison runs as you type, and the counts at the top tell you how much moved before you read a single line.

“Show only changes” folds away the long stretches that did not change, keeping three lines of context either side of each edit — which is what makes a two-line change in a 2,000-line document findable.

Both texts stay in your browser. Nothing is uploaded, stored or logged, and neither text is ever written into the page address. That matters more here than on most tools: the things people compare are contracts, config files, credentials and drafts that are not public yet.

Reading the result

Every line carries three signals, not just a color, so the result is readable in monochrome, to a color-blind reader, and to a screen reader.

+ on green — this line exists only in the changed text.

− on red — this line exists only in the original.

No marker — unchanged, present in both.

The two narrow number columns are the line’s position in the original and in the changed version. They start in step and drift apart as edits accumulate, which is itself useful: it tells you how far the numbering has shifted, the thing that makes “see line 340” unreliable between two versions of a document.

Why an edit shows as a removal plus an addition

The comparison works on whole lines. A line that changed at all is no longer the line it was, so it is reported as the old one leaving and a new one arriving.

They appear next to each other, so in practice a changed line reads as a pair and the difference is easy to spot. But it does mean that fixing one typo in a long paragraph shows the whole paragraph as replaced — which is correct, if not always what you hoped for.

The practical consequence: a text that is one long line diffs badly. If your document has no line breaks, the comparison has exactly one line on each side to work with and can only say “this changed”. Add breaks — at sentences or paragraphs — and the result becomes precise. This is the same reason people writing prose in version control often put each sentence on its own line.

What the similarity percentage measures

It is the share of all lines, across both texts, that found a match. Two identical texts score 100%. Two with nothing in common score 0%.

It counts lines, not words, and that distinction changes the number a lot. Reindent a file and every line changes, so the similarity collapses to near zero even though not a word moved — turn on “Ignore whitespace” and it jumps back to 100%. Conversely, changing one word on every line of a document scores low while most of the wording is untouched.

Read it as “how much of the structure survived”, not “how similar is the writing”.

The ignore options

Ignore capitalization matches lines that differ only in case. Useful when comparing exports from two systems that disagree about capitalizing headers or names.

Ignore whitespace trims each line’s ends and collapses runs of spaces and tabs into one. This is the setting for code that has been reindented, for anything that has been through a formatter, and for text copied out of a PDF, which usually arrives with spacing that nothing else agrees with.

Neither option rewrites anything. They change what counts as a match; the lines displayed are always exactly what you pasted, spacing and capitals included. So you can turn “Ignore whitespace” on to find the real changes, and still see the original indentation of every line shown.

How the comparison works

Finding the difference between two texts sounds simple and is not. What you want is the smallest set of changes that turns one into the other — because a bigger set is also a correct answer, and a bad diff is one that reports twenty lines as changed when one was inserted.

This tool uses Myers’ algorithm, the same approach behind git diff. Its useful property is that its cost scales with the number of differences rather than with the size of the documents, which is why a one-line change in a long file is found instantly. Before it runs, the matching lines at the start and end are trimmed away, so two documents sharing their first 900 lines cost nothing for those 900.

The result is minimal: nothing is reported as changed that did not have to be.

When two texts are too different

Occasionally the tool says the two texts have too little in common to line up, and shows everything between the matching start and end as replaced.

This is a real limit rather than a failure. Aligning two texts is only meaningful when they are versions of the same thing; past a point there is no alignment worth finding, and searching for one would take long enough to lock up the page. So the tool checks first whether an alignment can exist at all, and says so when it cannot.

In practice, seeing that message usually means one of the boxes has the wrong text in it.

What it does not do

It compares lines, not words within a line. Some diff tools additionally highlight which words inside a changed line differ; this one shows you the pair and leaves the reading to you.

It does not detect moved blocks. A paragraph relocated from the top of a document to the bottom is reported as removed from one place and added in the other, not as “moved” — which is true, and is also how git diff behaves by default.

And it compares text, not documents. Word files, PDFs and spreadsheets have to be converted to text first, at which point the formatting differences are gone and you are comparing the words.

What people use this for

Contract and policy versions. Paste the version you agreed and the one you were sent back, and the changed clauses stand out immediately. This is the single most common use, and the reason the tool has to be trustworthy about not uploading anything.

Config files. A working config against a broken one, with “Ignore whitespace” on, is usually a one-line answer.

Code review outside a repository. A snippet from a colleague against the version you have, without committing anything.

Drafts. Two versions of an essay, a proposal, or a translation, to see what the last round of edits actually changed.

Data exports. Two CSV dumps taken at different times: the added and removed lines are the records that appeared and disappeared. Sort both first, or the row order will swamp the real changes.

Frequently asked questions

How do I read the result?

Lines marked + on a green background exist only in the changed text. Lines marked on a red background exist only in the original. Everything else is unchanged. The two number columns give each line's position in the original and in the changed version, which is why they drift apart as edits accumulate.

Why is an edited line shown as one removal and one addition?

Because the comparison works on whole lines. A line that changed at all is a line that no longer exists in its old form, so it is reported as the old one going and a new one arriving — shown next to each other, so the change is easy to read.

What does the similarity percentage mean?

The share of all lines, across both texts, that matched. Two identical texts are 100%; two with nothing in common are 0%. It counts lines rather than words, so a small edit to every line scores low even though most of the wording is the same.

Can it compare two files?

Open each file, copy its contents and paste them into the two boxes. The tool works on text, so anything you can read as text — code, CSV, JSON, Markdown, a plain-text export — compares fine. Formats that are not text, such as Word or PDF, need converting first.

What do the ignore options do?

"Ignore capitalization" treats Hello and hello as the same line. "Ignore whitespace" ignores indentation and collapses runs of spaces, which is the setting for comparing code that has been reindented. Neither rewrites your text — they change what counts as a match, and the lines shown are always exactly what you pasted.

Why does it say the two texts have too little in common?

Lining up two texts is only worth doing when they are versions of the same thing. Past a point there is no meaningful alignment to find, so rather than spend a long time producing a poor one, the tool says so and shows the two blocks as replaced. If you pasted the wrong text, that message is usually the reason.

Is anything uploaded?

No. Both texts are compared in your browser and are never uploaded, stored, logged, or written into the page address. This matters here — the things people compare are usually contracts, credentials or unreleased drafts.