0

Text Similarity Checker

Compare two texts with real n-gram Jaccard similarity and a word-level LCS overlap score, with the matching passages highlighted side by side.

This tool only compares the two texts you paste here — it has no internet connection, search index, or content database, so it cannot check for plagiarism against other web pages. Matching is case-insensitive; punctuation and line breaks are ignored when scoring but preserved in the highlighted view below.

Buy Me a Coffee at ko-fi.com
Processing... 0%
Tokenizing both texts into words
Computing n-gram Jaccard similarity
Aligning texts with a word-level LCS
Rendering matched-word highlights

Result

This tool compares two texts you paste in using two independent, real, well-documented algorithms — not a vague "looks similar" heuristic. The first is n-gram Jaccard similarity: each text is tokenized into words, then split into overlapping runs of n consecutive words (an n-gram; the default is n=3, a trigram, and you can adjust it from 1 to 5). The Jaccard index of the two resulting n-gram sets — the size of their intersection divided by the size of their union — is a standard set-based similarity measure used across information retrieval and near-duplicate detection. A higher n catches longer shared phrasing and is stricter about exact wording; a lower n is more forgiving and catches loose word-overlap even between differently structured sentences.

The second algorithm is a genuine word-level Longest Common Subsequence (LCS), computed with a real O(n·m) dynamic-programming table over the two word sequences — the same textbook algorithm used by diff tools, not an approximation. Unlike the n-gram score, the LCS does not require matched words to be contiguous, so it captures overlap even when a sentence has been reordered or lightly edited in between shared phrases. The overlap percentage is derived from the LCS length relative to the average length of both texts. The DP table is then backtracked to identify precisely which words in each text took part in that longest common sequence, and this is the standout feature: those words are mapped back onto your original text — with its original spacing, line breaks, and punctuation intact — and rendered as highlighted spans side by side, so you can see exactly which passages overlap instead of trusting a bare number.

Scope and honesty matter here: this is a two-text comparison tool, not a plagiarism detector. It has no internet connection, no search index, and no database of other people's content to check against — it can only ever tell you how similar the two texts you paste in are to each other. That makes it well suited to comparing draft revisions, checking how much a paraphrase or rewrite actually changed, or spotting near-duplicate content across your own pages. Word matching is case-insensitive, and the O(n·m) LCS table is capped at a few million word-pair cells — for very large texts (roughly a few thousand words combined) the exact LCS and highlighting step is skipped with a plain-language note, while the n-gram Jaccard score, which only costs linear time, is always computed on the full text. Everything runs locally in your browser; neither text ever leaves your device.