TTKTheTextKit
Developer & Web Tools

Diff Checker

Paste the original text in the left box and the changed text in the right box, then click Compare. The tool performs a line-by-line diff and highlights additions in green and deletions in red, making it easy to spot what changed between two versions. All comparison runs in your browser — no files are uploaded.

Related Tools

[3 suggestions]

About the Diff Checker

The Diff Checker implements a Longest Common Subsequence (LCS) algorithm operating at the line level. LCS finds the largest set of lines common to both inputs in their original order. Lines present only in the original are marked as deletions (shown in red), lines present only in the changed version are marked as additions (shown in green), and lines present in both are shown as unchanged context. This is the same fundamental algorithm used by Unix diff, git diff, and most modern code review tools. The implementation is O(n·m) in time and space, where n and m are the line counts of each input — it handles hundreds of lines quickly in the browser without any external library. Common uses include comparing different versions of a configuration file, checking what changed between two drafts of a document, reviewing a colleague's text edits, or auditing contract clause changes.

Is this a word-level or line-level diff?▾

The diff operates at the line level — each line is treated as a single unit. Lines that are present in one version but not the other are highlighted entirely. Word-level diffing within a changed line is not currently performed.

How does the LCS diff algorithm work?▾

The Longest Common Subsequence (LCS) algorithm finds the largest set of lines common to both inputs in their original order. Lines not in the LCS are classified as either additions (only in the new text) or deletions (only in the original).

Is there a size limit for the inputs?▾

The LCS algorithm is O(n×m) in memory, so very large inputs (thousands of lines each) may be slow in the browser. For typical documents and configuration files (under a few hundred lines), comparison is near-instantaneous.