Side-by-Side Text Diff
Paste or upload two versions of any text and see them compared column by column, original on the left, updated on the right. Added, removed, and changed lines are colour-coded and aligned so your eye can scan straight across to spot every difference, and the words that changed inside a line are highlighted. Useful for reviewing edits to prose, translations, configuration files, and code. All processing runs in your browser.
How it works
The diff runs in a Web Worker. Lines that match at the start and end of both texts are set aside, then a longest common subsequence (LCS) algorithm finds the removed and added lines in the region between them. Within each change, removed lines are paired in order with added lines to form rows, and each pair gets a second LCS pass over its words, split at whitespace, to highlight what changed on each side. A line with no partner leaves the other column blank, and unchanged runs keep three lines of context around each change.
Processing runs in your browser
All diffing is done locally using browser APIs. Our servers are not involved at any point.
Frequently asked questions
- How are the two columns lined up?
- Unchanged lines sit on the same row in both columns. A changed line is paired with its new version, with removed words highlighted on the left and added words on the right. A line that exists on one side only leaves the other column blank.
- What happens to long unchanged sections?
- They are folded, keeping three lines of context around each change, so the view stays on what changed.
- Does it show how many lines changed?
- Yes. The bar above the result counts added, removed and unchanged lines across the whole comparison.
- Can I keep editing after comparing?
- Yes. Both input panes stay editable, and the comparison runs again in a Web Worker as you type or load a new file.
Related operations
For making the same change everywhere in one file, try find and replace. To put both inputs in matching order before comparing, use sort lines. For diffing two JSON payloads after pretty-printing, see the JSON formatter.
Last reviewed September 30, 2026
Other pages for this tool
Related tools
- Background reading: Complete guide to text tools