
How to Compare Two Texts Side by Side
Paste two versions of a text or open two files, and see the removed lines in red, the added lines in green and the changed words marked.
2 min read
Compare two texts or files side by side, like a code editor diff. See removed and added lines lined up, with the changed words marked.
A side-by-side comparison puts two versions of a text in two columns and lines up the lines that match. The lines that only the first version has are marked on the left, the lines that only the second version has are marked on the right, and the unchanged lines between them stay level. It's the view code editors and code review sites use for diffs, and it makes it easy to read a change in context instead of as a list of edits.
This tool compares two texts or files side by side. Paste the original version on the left and the modified version on the right, or open a file on each side. Removed lines turn red, added lines turn green, and inside a changed line the words that changed get a darker color. Both sides stay editable, so the comparison updates as you type.
The tool splits both texts into lines and matches the lines they have in common, using the jsdiff library. The lines left without a match are removed or added. When a removed line sits next to an added line, the two are compared word by word, and the changed words are marked if enough of the line stayed the same. When most of a line is new, the whole line is colored instead. Spaces and letter case count as changes. Everything runs in your browser, and the texts are never uploaded.

Paste two versions of a text or open two files, and see the removed lines in red, the added lines in green and the changed words marked.
2 min read