Converter · SOTA Myers O(ND) + unified
Diff Viewer & Text Compare
Compare two texts with the Myers O(ND) diff algorithm. Word, character, and line-level modes with unified and side-by-side output and syntax-highlighted changes.
How to Use Diff Viewer in 3 Steps
- Configure. Paste original text on the left and modified text on the right. Text pastes load instantly with no upload.
- Process. Pick diff granularity: line (best for code), word (best for prose), or character (best for short strings).
- Export. Toggle between unified view (classic git-diff style) and side-by-side view. Green highlights additions, red highlights removals.
Why Diff Viewer on Pixlane
Text diff is used by developers reviewing changes, writers comparing document versions, QA teams validating output, and legal/compliance teams spotting changes in contracts. Pixlane implements the classic Myers O(ND) diff algorithm — the same algorithm powering git diff, the gold standard for textual comparison.
- Myers O(ND) Algorithm — The same diff algorithm used by git and modern IDEs — produces minimal, human-readable patches.
- Three Granularities — Line-level for code, word-level for prose, character-level for short strings. Switch with one click.
- Privacy-Safe — Your texts — which may include sensitive contracts, proprietary code, or personal documents — never leave your browser.
- Two Views — Unified (inline) for compact diffs, side-by-side for structural comparison. Both generated from the same minimal edit script.
Frequently Asked Questions
What is the Myers diff algorithm?
Myers O(ND) is the classic diff algorithm published by Eugene Myers in 1986. It computes the shortest edit script (SES) between two sequences in O((N+M)·D) where D is the number of edits. It powers git diff, Meld, and most modern diff tools.
Which granularity should I use?
Line mode for source code and structured text. Word mode for natural language — produces readable diffs for prose without character-level noise. Character mode for short strings or single lines where you need to see every edit.
Is my data sent anywhere?
No. All diff computation runs in your browser using native JavaScript. Your texts never leave your device.
Can I diff large files?
Yes. The O(ND) algorithm scales well. For files over 10 MB, consider line-mode diffing to keep performance snappy.