Text diff
Compare two versions of a text and see exactly which lines changed.
Differences
+0 · −0 · 0 unchangedPaste both versions to compare them.
What to know
- Note: Paste both versions to compare them.
How to use it
- Paste the original on the left and the changed version on the right.
- Read the result: + is added, − is removed, everything else is unchanged.
- Turn on ignore whitespace if indentation or trailing spaces are noise.
- Nothing is uploaded, so client copy and contracts are safe to paste.
Diffs work on lines
The algorithm finds the longest subsequence of lines the two versions share, then marks everything outside it. A line with one word changed is therefore a removal and an addition rather than an edit.
That is why reformatting a paragraph shows as a complete rewrite: the line breaks moved, so no line matches, even though almost every word survived.
Whitespace is the usual culprit
Text pasted from a PDF, an email client or a different editor often differs on every line by a trailing space or a non-breaking character. The diff is correct and useless.
Ignoring whitespace answers the question you actually had, which is whether the words changed.
Nothing leaves the page
Comparing a draft contract, a client brief or unpublished copy in an online tool means uploading it to someone else server.
This runs entirely in the browser tab. You can disconnect from the network and it still works.
Most surprise diffs are invisible characters
When two texts look identical but every line is marked changed, the cause is almost always line endings: Windows writes CRLF, macOS and Linux write LF, and a file that has travelled between them carries both. Trailing spaces and a tab swapped for four spaces do the same thing.
A non-breaking space pasted from a word processor or a CMS is the other common one. It looks exactly like a space and is a different character.
Text diff FAQ
How does a diff decide what changed?
It finds the longest sequence of lines common to both versions and treats everything else as added or removed. A line that was edited therefore shows as one removal and one addition, because the algorithm works on whole lines.
Why does it say everything changed?
Usually line endings or indentation. Text copied from a PDF or a different editor can differ invisibly on every line. Turn on ignore whitespace and see whether the words are the same.
Is my text uploaded anywhere?
No. The comparison runs in the page, in your browser. Nothing is sent to a server, which is the point of doing it here rather than in an online tool that asks you to paste a contract.
Can it compare word by word instead of line by line?
It works on whole lines, so an edited sentence appears as one removal and one addition. The usual workaround for prose is to put each sentence on its own line in both versions before comparing, which makes the changes far easier to read.
How do I compare two Word documents?
Paste the text of each into the two boxes. If you need formatting and tracked changes compared as well, Word has its own compare feature and it will do a better job — this tool is for the words.
Can I diff code or JSON?
Yes. For JSON, format both sides the same way first — same indentation and, ideally, the same key order — or every line will appear changed for reasons that have nothing to do with the content.
Why does a block that simply moved show as deleted and added?
Because the algorithm finds common sequences rather than tracking movement. A paragraph relocated from the top to the bottom is, structurally, a removal in one place and an addition in another. No line-based diff reports moves as moves.
How large can the two texts be?
Comfortably into thousands of lines. The comparison work grows with the product of the two lengths, so two very large and very different documents will be slow — if it stalls, compare one section at a time.
What if the words are identical but every line still differs?
Look for invisible characters: a non-breaking space pasted from a web page, a curly quote where the other version has a straight one, or a different dash. Ignoring whitespace will not catch those, because they are not whitespace.
Is this safe for confidential documents?
Yes. The comparison happens in your browser and nothing is transmitted or stored. That is the main reason to use a tool like this rather than one that asks you to upload a contract to a server you know nothing about.