Comparing two versions of a document, a config file, or a code snippet by hand is slow and unreliable: a small edit buried in a long text is easy to miss, especially when several lines changed in different places.
How the comparison works
The text comparison tool finds differences between two versions line by line. Paste the original into one field and the edited text into another: the comparison highlights added lines in green and removed lines in red, with a counter showing how many lines were added and how many were removed.
The comparison is line-based — each line is counted as either added, removed, or unchanged in its entirety. The underlying algorithm is the classic LCS (longest common subsequence) — the same principle version control systems like Git use when displaying a diff.
What it's useful for
- Checking edits in a document or contract — quickly see exactly what changed between two versions of a text, without comparing line by line by eye.
- Comparing two versions of a config or code — pinpoint the specific lines that differ before figuring out why a system's behavior changed.
- Finding the difference between file copies — for example, if the same file was edited in two places and you need to figure out which version is current.
- Verifying automated text processing — comparing text before and after a script or a find-and-replace, to confirm exactly the intended change happened.
Limitations
The comparison is line-based, not character-based: if a single word changes within a long line, the whole line is shown as removed and re-added, rather than as a partial change within the line. For very large texts — tens of thousands of lines — the comparison can run a bit slower, but that's normal behavior for a browser-based calculation, not a bug.
Bottom line
Line-by-line text comparison removes the need to hunt for differences by hand — paste both versions in, and the differences are highlighted immediately, with a count of added and removed lines.