About Text Diff
What it does
Text Diff compares two texts and shows what changed — like a GitHub pull-request review, but for any pair of strings. Granularity flips between line, word, and character level; intra-line highlights make small edits easy to spot inside otherwise-identical lines.
How it works
- Myers' diff algorithm via the
diffnpm package powers the comparison — same algorithm git uses internally. - Output formats: side-by-side or unified view in the UI; "Download patch" emits a unified-diff
.patchfile ready forgit applyorpatch -p1. - Granularity can be toggled mid-comparison — the diff recomputes against the current pair of texts at the new tokenisation.
Limits
- Three-way merge with conflict markers isn't supported.
- Binary file comparison isn't supported.
- Syntax-aware diffing for code (e.g. ignoring whitespace inside strings) isn't supported.
- Performance stays smooth up to a few thousand lines per side; character-level diff slows perceptibly past that, line-mode stays fast.
Privacy
The comparison runs entirely in your browser. Text never leaves the device — no upload, no logging. Patch files are generated as download blobs.