Text Diff Checker
Compare two texts and see the differences highlighted line by line.
Free Online Text Diff Checker
The text diff checker compares two blocks of text and highlights the differences at the line level. It uses the Longest Common Subsequence (LCS) algorithm to determine which lines were added, removed, or modified between the original and changed versions. Added lines are highlighted in green, removed lines in red. This is useful for comparing code revisions before committing changes, reviewing document edits from collaborators, checking configuration file changes, verifying that find-and-replace operations produced the expected results, and comparing output from different versions of a script or template. The diff output displays line numbers for easy reference, plus a summary showing the count of added, removed, and unchanged lines.
How the Diff Algorithm Works
The LCS algorithm finds the longest sequence of lines that appears in both texts in the same order. Lines that exist in the original but not in the changed text are flagged as removed. Lines that exist in the changed text but not in the original are flagged as added. Lines that exist in both but at different positions may indicate structural changes. All computation happens locally in your browser — no text is uploaded to any server, making this safe for comparing sensitive code, confidential documents, or proprietary configuration files.