Compare two texts
Two columns, deletions in red and additions in green, with the changed words picked out inside each line.
Drop your files here
.txt, .md, .csv, .json · up to 5 MB
How to Compare
- 1
Put a text on each side
Paste them, or drop two files at once.
- 2
Choose how fine to compare
Whole lines, words or single characters.
- 3
Read the difference
Or download a unified .diff patch of it.
Ignoring something changes the matching, not the text
The options to ignore capitals, spacing or punctuation exist because a difference in those is usually not a difference you care about: a line reindented is not a line rewritten. What they change is the key used to line the two texts up. What you see on screen is always the original, character for character, so anything you copy out of the result is the real text rather than a normalised version of it. Tools that normalise the display instead quietly hand you text that exists nowhere.
Three levels of detail, for three different questions
Line level answers which lines moved, appeared or vanished, and is the right view for code, configuration and CSV. Word level, the default, also shows which words inside a changed line actually changed, which is what you want for prose: a paragraph with one replaced adjective should not read as entirely rewritten. Character level is for the cases where a single letter matters, such as an identifier, a serial number or a URL, and it is deliberately not the default, because on ordinary text it produces confetti.
Deletion followed by insertion is one change, not two
A line that was edited shows up in a naive diff as a removal and then an addition, and the reader has to hold both halves in their head to see the edit. Here a removal immediately followed by an insertion is joined into a single changed row, with the old text on the left and the new on the right, so an edit reads as an edit. The counts follow the same logic: added, removed and changed are three separate numbers rather than one inflated pair.
The match percentage, and what it is measured against
The percentage is unchanged lines divided by the length of the longer side. That denominator matters: if a hundred-line document grows to two hundred, half of the result is new, and measuring against the original would report a hundred per cent match while the reader sees a very different document. Downloading the result gives a unified patch, the standard --- +++ @@ format that git apply and every code review tool already understand, with as much surrounding context as you asked for.
Both texts stay on your device
The comparison runs entirely in your browser, including the diff library, which is fetched from this site and then executed locally. Nothing is uploaded, nothing is stored, and there is no account. This matters more here than in most tools, because comparing two versions of a document usually means both of them are drafts you would rather not share.
Frequently asked questions
Can I compare two files instead of pasting?
Yes, drop both at once and they fill the two sides in order. Text, Markdown, CSV and JSON are accepted, up to 5 MB each.
What does the percentage mean?
Unchanged lines as a share of the longer of the two texts. Measuring against the shorter one would report a perfect match whenever a document was only added to.
Why are some lines marked as changed rather than added and removed?
Because that is what happened: a removal immediately followed by an insertion is one edit. Joining them lets you read the old and new versions of the line side by side.
What is a .diff file for?
It is the standard unified patch format. Code review tools read it, and git apply can replay the change onto a file. The amount of unchanged context around each change is adjustable.
Does ignoring spacing change my text?
No. It only changes how lines are matched to each other. The text shown and copied is always exactly what you pasted.
How large can each side be?
Up to 5 MB or 500 000 characters per side. Bigger documents should be split first.
Is anything sent to a server?
No. Both texts are compared in your browser and never leave it.