By Tim King · Updated
Text Similarity Checker
Levenshtein, Jaccard and Cosine Similarity, With the Shared Words Listed
OneTask is free, with no sign-up, and built by one person.
If this tool saved you time, a coffee helps keep new ones coming.
How the Text Similarity Checker works
This text similarity checker compares two pieces of text and gives a similarity percentage four ways: by characters, by edit distance and by two measures of shared words. Use it to compare product descriptions, check paraphrases, match names or see how far two drafts have drifted.
How the text similarity checker works
Character similarity comes from the Levenshtein edit distance: the fewest single-character insertions, deletions and substitutions that turn one text into the other. Jaccard similarity compares the sets of distinct words, ignoring case and punctuation. Cosine similarity compares how often each word appears, so repeated words carry more weight. Each answers a different question, so the four scores often disagree.
The formula for character similarity is 1 − edit distance ÷ length of the longer text. Jaccard is words in both ÷ words in either.
First example. "kitten" and "sitting" are 3 edits apart (k→s, e→i, add g), so character similarity is 1 − 3 ÷ 7 = 57.1 percent, while the word scores are 0 because the words differ.
Second example. "the cat sat on the mat" and "the cat sat on a mat" share 5 of 6 distinct words, a Jaccard score of 83.3 percent, with cosine 86.6 percent and character similarity 86.4 percent.
How many edits make texts different? There is no fixed cut-off; under 10 percent of the length usually means small edits, over 50 percent a rewrite.
Example text pairs scored four ways
| Text A | Text B | Edit distance | Character similarity | Jaccard (words) | Cosine (words) |
|---|---|---|---|---|---|
| kitten | sitting | 3 | 57.1% | 0.0% | 0.0% |
| colour | color | 1 | 83.3% | 0.0% | 0.0% |
| flaw | lawn | 2 | 50.0% | 0.0% | 0.0% |
| book | back | 2 | 50.0% | 0.0% | 0.0% |
| night | nacht | 2 | 60.0% | 0.0% | 0.0% |
| receive | recieve | 2 | 71.4% | 0.0% | 0.0% |
| separate | seperate | 1 | 87.5% | 0.0% | 0.0% |
| Saturday | Sunday | 3 | 62.5% | 0.0% | 0.0% |
| organise | organize | 1 | 87.5% | 0.0% | 0.0% |
| abc | xyz | 3 | 0.0% | 0.0% | 0.0% |
| listen | silent | 4 | 33.3% | 0.0% | 0.0% |
| the cat sat | the cat sat down | 5 | 68.8% | 75.0% | 86.6% |
| the cat sat | a cat sat | 3 | 72.7% | 50.0% | 66.7% |
| the cat sat | sat the cat | 7 | 36.4% | 100.0% | 100.0% |
| quick brown fox | quick brown dog | 2 | 86.7% | 50.0% | 66.7% |
| red green blue | blue green red | 8 | 42.9% | 100.0% | 100.0% |
| data science | science data | 10 | 16.7% | 100.0% | 100.0% |
| hello world | hello there world | 6 | 64.7% | 66.7% | 81.6% |
| I like tea | I like coffee | 5 | 61.5% | 50.0% | 66.7% |
| same text | same text | 0 | 100.0% | 100.0% | 100.0% |
| buy now | purchase today | 11 | 21.4% | 0.0% | 0.0% |
| north east | north west | 2 | 80.0% | 33.3% | 50.0% |
| big house | large home | 6 | 40.0% | 0.0% | 0.0% |
| 2024 report | 2025 report | 1 | 90.9% | 33.3% | 50.0% |
Tips and pitfalls
Word scores ignore order, so "dog bites man" and "man bites dog" score 100 percent on Jaccard and cosine; use character similarity when order matters. Edit distance grows with length, so compare percentages, not raw edits, across texts of different sizes. Each text is limited to 20,000 characters to keep the edit-distance calculation fast.
FAQ
Which similarity score should I use?
Use character similarity for short strings such as names, codes and typos. Use Jaccard to see how much vocabulary two texts share, and cosine when word frequency matters, as with longer documents compared for topic.
What is Levenshtein distance?
It is the minimum number of single-character insertions, deletions and substitutions needed to change one text into the other. It was described by Vladimir Levenshtein in 1965 and is the standard measure for spelling and fuzzy matching.
Is this a plagiarism checker?
No. It compares the two texts you paste and nothing else; it does not search the web or a database. It can show how close a paraphrase is to its source when you have both texts.
Does capitalisation affect the score?
Word scores ignore case and punctuation. Character similarity and edit distance count every character exactly, so "Hello" and "hello" are one edit apart and score 80 percent on characters.
Why is there a length limit?
Edit distance compares every character of one text with every character of the other, so the work grows with the product of the lengths. A 20,000-character limit per text keeps it quick in the browser.
See also: all Writing & Editing tools, Lists & Lines, Markdown & HTML, Ciphers & Alphabets.
Related tools
Text Diff
Compare two texts and see exactly what changed.
Find Duplicate Text
List repeated lines, sentences and phrases with how often each appears.
Word Counter
Words, six readability scores, keyword density and platform limits.
JSON Diff
Compare two JSON documents and list every change by path.
Character Counter
Characters against SMS, meta and social post limits.