Free online diff checker. Compare two blocks of text and see the differences highlighted with added, removed, and unchanged lines. Developer utilities built for web developers, software engineers, and programmers. TekPulse's Diff Checker is completely free — no signup, no ads in results, and no data stored on our servers.
Longest Common Subsequence (LCS) via dynamic programming — O(m×n) time and space for m, n lines
This tool compares two texts line by line using the classic LCS algorithm: it builds an (m+1)×(n+1) table where each cell dp[i][j] holds the length of the longest sequence of lines common to both texts up through line i of text A and line j of text B. Matching lines extend the diagonal (dp[i-1][j-1]+1); non-matching lines take the larger of the cell above or to the left. Walking this table backwards from the bottom-right corner reconstructs the actual sequence of kept, added, and removed lines.
This is the same core algorithm behind the Unix `diff` command and `git diff` (which use a refined variant called Myers diff for speed) — it finds the minimal set of insertions/deletions that transforms text A into text B, rather than naively comparing line N of A to line N of B.
Help others discover this free tool. Share it or embed it on your website.
Free to embed with attribution link to tekpulse.in
Was this tool helpful?