Text Diff
Compare two blocks of text and see added and removed lines.
This tool needs JavaScript enabled to run in your browser.
What this tool does
This tool compares two blocks of text line by line and shows what changed: lines removed from the original are marked with a minus, lines added in the changed version with a plus, and unchanged lines are shown for context. Both blocks stay in your browser.
How the comparison works
It finds the longest run of lines the two versions share, then marks everything else as added or removed. This is the same approach source-control tools use, so the result lines up with the diffs you see in code review. A change to a line shows as one removed line and one added line.
Common use cases
- Comparing two API responses, log files or config versions.
- Checking what changed between an expected and an actual test output.
- Spotting a stray edit in a block of text before you paste it somewhere.
Good to know
The comparison is by whole lines, so a change in the middle of a long line shows as that entire line being replaced. For very large inputs the comparison is capped so the page stays responsive, and the tool tells you when that happens.
Frequently asked questions
- How does it compare the text?
- Line by line, using a longest-common-subsequence diff, the same idea behind source-control diffs. Lines are marked added, removed or unchanged.
- Is my text uploaded?
- No. Both blocks are compared locally in your browser.
Learning resources
Testsmith also runs hands-on courses and a free practice app for the skills behind this tool.