Text Diff / Compare

Compare two blocks of text or code side-by-side. Line-level differences highlighted, entirely in your browser.

Paste text into both boxes to see the differences.

About Text Diff

This tool computes a line-level diff using the classic Longest Common Subsequence algorithm — the same idea behind git diff. Removed lines are shown in red on the left, added lines in green on the right. Everything runs locally; your text never leaves the browser.

Frequently asked questions

How does the comparison work?

It performs a line-level diff using a longest-common-subsequence algorithm, then highlights added, removed and changed lines side by side so you can see exactly what differs between the two versions.

Can I ignore whitespace or case?

Yes. Toggles let you ignore leading/trailing whitespace and case differences, which is handy when comparing code or text where formatting changed but content did not.

Is my text uploaded?

No. The diff is computed in your browser, so you can safely compare private documents, code or logs.