Text Diff

Compare two blocks of text side by side and see every added, removed or changed line highlighted. 100% in-browser diff.

Runs entirely in your browser — no uploads

About this tool

Text Diff compares two versions line-by-line using a longest-common-subsequence algorithm, marking additions in green and deletions in red, with optional whitespace-insensitive mode.

Sensitive documents stay safe: both texts are compared entirely within your browser’s memory.

Free · no account No file uploads Works on mobile

FAQ

How are changes matched?
A dynamic-programming LCS finds the minimal edit script, then groups consecutive edits into readable hunks.
What does “ignore whitespace” do?
Lines differing only in spaces or indentation are treated as equal — useful for comparing reformatted code.
Can I compare large files?
Comfortably up to a few thousand lines. Extremely different texts produce longer diffs that take slightly longer to compute.