Longest Common Substring & Subsequence Finder
Find the longest contiguous match or non-contiguous subsequence between two texts with highlighted results.
Text comparison tools answer "what changed" or "how similar are these" for use cases like code review, document version comparison, plagiarism checking, and analysing pasted content from multiple sources. The tools here cover the three common comparison questions: line-by-line diff, similarity score, and longest matching substring.
The text diff tool runs the standard LCS (longest common subsequence) algorithm on a line basis — the same algorithm git diff uses for line-level diffs. It shows side-by-side or unified view, with three ignore-options (case, leading/trailing whitespace, all whitespace runs) for cases where formatting changed but content didn't. Output is copyable as a unified-diff patch ready to paste into a code review or commit message.
The similarity percentage checker uses Levenshtein distance normalised by length to produce a 0-100% similarity score, useful for plagiarism spot-checks and detecting near-duplicates. The longest common substring finder reports the longest run of characters that appears in both inputs, useful when comparing two legal documents or two configurations to find where they share specific text. The line-diff tool is capped at 5000 lines per side to keep memory bounded for very long documents.
Find the longest contiguous match or non-contiguous subsequence between two texts with highlighted results.
Compare two strings with Levenshtein, Jaro-Winkler, Dice, and cosine similarity — each tuned for a different use case.
Compare two texts line-by-line with side-by-side or unified diff view, plus ignore-case and ignore-whitespace options.