Account

What new tool do you want?

Text & Writing

Text Compare (Diff Checker)

Compare two versions of text or code line by line and see exactly what was added, removed or unchanged.

How to use

  1. 1Paste the original on the left and the changed version on the right.
  2. 2Removed lines show in red and added lines in green.

How it's calculated

Lines are matched using the longest common subsequence — the same approach as git diff — so moved blocks show as a removal plus an addition.

Frequently asked questions

Is my text uploaded to compare it?

No. The comparison runs entirely in your browser, so it's safe for private documents and source code.

Can it ignore whitespace or case?

Yes. Turn on the options to treat lines as equal when they differ only in spacing or capitalization.

How large can the texts be?

A few thousand lines each works smoothly. Very large files may take a moment since every line is compared.

A worked example of why a moved block shows as two changes, not one

Comparing "a\nb\nc" against "a\nx\nc\nd" reports 2 lines added, 1 removed, 2 unchanged — "a" and "c" match as unchanged (even though "c" moved from position 3 to position 3, it's still recognized because its neighbors before and after still align), "b" is removed, and both "x" and "d" count as added. This is the direct, visible consequence of using longest-common-subsequence matching (the same algorithm git diff uses): the algorithm finds the longest run of lines that appear in the same relative order in both versions and treats everything else as pure insertions or deletions — it doesn't have a concept of 'this line moved,' only 'this line is gone here' plus 'this line is new there.'

Why normalized comparison still shows your original text

Turning on Ignore whitespace and Ignore case makes "Hello world" (two spaces) and "hello world" register as identical — but the comparison is actually done on a normalized copy of each line (lowercased, whitespace collapsed) while the diff positions are then mapped back onto the original, unmodified text for display. That's a deliberate two-pass design: you get the forgiving comparison logic you asked for, without losing the actual capitalization and spacing of your real content in the output — you're not looking at a lowercased, whitespace-stripped version of your document, just a diff that was computed as if it were.

Why this is safe for source code and confidential drafts alike

The line-matching algorithm runs entirely in JavaScript in your browser tab — there's no server call involved in computing which lines match, which is exactly why the FAQ can confidently say nothing is uploaded, making this usable for comparing two versions of a contract, a password-containing config file, or proprietary source code without it ever leaving your machine. The tradeoff is purely computational: comparing two multi-thousand-line files means your browser's own CPU does the LCS computation, which is why extremely large files take a moment longer — there's no server-side compute to offload the work to.

A carriage return only disappears when whitespace is ignored

Ignore whitespace and Ignore case both start off. Ignore whitespace trims each line and collapses runs of spaces before it compares, which also removes a carriage return sitting on the end of a Windows line. With that switch off, those line endings can show as changes even when the words are the same. The line I am shown is still my original text, not the trimmed copy. Identical is the headline, and it says Yes only when nothing was added and nothing was removed. Unchanged is every compared line that was neither an add nor a removal. The two boxes open labeled Original text and Changed text.

Related tools

More: Text & Writing