Text Diff Checker
Compare two texts and see the differences highlighted line by line.
Built and tested by Muhammad Irfan Liaqat · Updated
Text Diff Checker: key facts
- Compares two texts line by line and highlights added and removed lines
- Shows how many lines were added, removed and left unchanged
- Whole lines are compared, so a one-letter change marks the full line as changed
- Text is pasted in, not uploaded, and the comparison runs in the browser
How the text comparison works
Paste the original text on the left and the changed version on the right, and the diff checker marks every line that was added in green and every line that was removed in red. It works with any plain text, including source code, configuration files, JSON, CSV and contract drafts.
The comparison runs line by line using jsdiff, an open-source implementation of the Myers diff algorithm, which is also the default algorithm in Git. An edited line appears as a removed line followed by an added line, so compare the pair to find the exact change. Differences in spaces, tabs or line endings count as changes, which explains lines that look identical but are still marked. Both texts stay in your browser.
How to compare two texts and see the changes
- 1Paste the original text into the left box
- 2Paste the changed text into the right box
- 3Read the result: added lines in green, removed lines in red
- 4For an edited line, compare the removed and added versions to find the change