⬡ Text · Compare

Text Diff

Paste two versions of a text and see exactly what changed. A line-level comparison highlights added, removed, and unchanged lines in a single unified view, updating as you type.

Compare

Difference

+0 added −0 removed 0 unchanged

        

About this text diff tool

Spot the changes between two pieces of text without reading them side by side word for word. Paste an old draft on the left and a new draft on the right, and the tool computes the smallest set of edits that turns one into the other. Lines that match are shown in grey, removed lines are marked with a red , and added lines with a green + — the same layout you see in a code review.

How to use it

Is my text private?

Completely. The diff is calculated in your browser with JavaScript. Neither block of text is uploaded, logged, or sent to any server.

How does it decide what changed?

It finds the longest common subsequence of lines — the longest run of lines that appear in both texts in the same order — and treats everything outside it as removed (from the original) or added (in the new version). This produces the minimal, most readable set of edits.

Does it compare word by word within a line?

No, the comparison is at the line level. If a single word changes, the whole old line shows as removed and the whole new line as added. This keeps the output clear and predictable for documents and config files.

Is whitespace significant?

Yes. Trailing spaces, indentation, and blank lines all count, so two lines must match exactly to be treated as unchanged. That makes it reliable for code and structured text where spacing matters.