Text similarity checker
Paste two texts and get three similarity scores at once. They measure different things, so you can see whether the texts differ in spelling, in vocabulary or in word frequency. Nothing leaves your device.
Runs in your browser: nothing you enter is sent anywhere.
How to use it
- Paste the first and second text.
- Read the three scores and the line under each one that explains the numbers behind it.
- Switch the case option to treat “Word” and “word” as different.
How it works
Character similarity is 1 − Levenshtein distance ÷ the length of the longer text, with characters counted as whole Unicode characters.
Shared words is the Jaccard index: the size of the intersection of the two word sets divided by the size of their union.
Word-count similarity is the cosine of two vectors holding how often each word occurs: the dot product divided by the product of the vector lengths.
Worked example
“the cat sat” and “the cat ran” share two distinct words (the, cat) out of four in total (the, cat, sat, ran), so Jaccard is 2/4 = 50 %. Their count vectors have a dot product of 2 and each has length √3, so the cosine is 2/3 = 66.7 %. For “a a b” and “a b b” the Jaccard score is 100 % because both use the same set, while the cosine is 4/5 = 80 % since the counts differ.
Tips
For long documents, compare a section at a time. To spot where two versions differ, use the text diff tool instead; this one gives a single measure.
Frequently asked questions
Which of the three scores should I use?
Use the character score to catch typos and small edits in similar strings. Use the shared-words score to see how much vocabulary two texts have in common. Use the word-count score to compare texts of different length, because repeating the same words in both raises it. None of them understands meaning, so two texts that say the same thing in other words can score low.
How is the character score calculated?
It is the Levenshtein edit distance, the smallest number of single-character insertions, deletions and replacements that turn one text into the other. The score is 1 − distance ÷ the length of the longer text. "kitten" and "sitting" need 3 edits and the longer word has 7 characters, so 1 − 3/7 gives 57.1 %.
What counts as a word?
A run of letters and digits in any script, in lower case, with apostrophes inside a word kept ("don't" is one word). Punctuation and spaces separate words.
Why is there a length limit?
Comparing characters takes a number of steps equal to the two lengths multiplied, so it would freeze the page on very long texts. Each text is cut to its first 5,000 characters, and a note appears when that happens. All three scores use the cut text.
Can I use it to detect plagiarism?
Only as a rough hint. A high score shows that the texts are close, but a low one proves nothing, because reworded or reordered text slips past all three measures. It is not a plagiarism checker.