Chris Collins

Tools · encoding

Text diff

Compare two texts by line, word, or character — side by side, inline, or as a unified patch — with whitespace and case options.

Added

How to use it

Paste or open two files. Line diffs show side by side or inline, with changed lines paired and the changed words inside them highlighted; long unchanged stretches collapse (click to expand). Word and character diffs show the changes in running text.

Ignore whitespace and Ignore case compare loosely. Swap exchanges the sides. Copy patch and Download .diff produce a unified diff (three lines of context) that git apply and patch understand — name the files in the boxes above each input.

The diff is the Myers algorithm, the same one git diff uses by default, and it runs entirely in your browser.

Sharing

Share link copies a URL that opens this tool exactly as you have it. Hand-written links work too: ?a=…&b=…, plus nameA, nameB, unit (line, word, char), view (sbs, inline, unified), ignoreWs, ignoreCase, collapse (1/0). For example ?a=one%0Atwo%0Athree&b=one%0A2%0Athree.

Runs entirely in your browser; nothing you type leaves this page.