Text Similarity Checker
Compare two texts with five lexical similarity metrics, computed exactly in your browser, with the words each one has and the other lacks.
The most forgiving of the five metrics below, and the one that behaves best on typos, inflections and reordered words. 1.0 is identical; below about 0.4 the two texts have little surface in common.
| metric | value | what it sees |
|---|---|---|
| Jaccard, word sets | 0.333 | shared words ÷ total distinct words |
| Cosine, term frequency | 0.608 | like Jaccard but counts repeats |
| Dice, character trigrams | 0.448 | survives typos and word endings |
| Levenshtein similarity | 0.289 | 1 − edits ÷ length; order matters |
| Containment | 0.571 | is the shorter one inside the longer? |
- Words in A / in B
- 17 / 19
- Distinct words shared
- 8
- Only in A
- 6
- Only in B
- 10
- Edit distance
- 69
| words | |
|---|---|
| Shared | account, and, at, billing, invoice, of, the, to |
| Only in A | emailed, end, generated, is, owner, period |
| Only in B | an, close, cycle, each, it, owns, produce, send, we, whoever |
First 40 of each. This list is usually more diagnostic than any of the scores.
Everything on this page runs in your browser. Nothing you paste is uploaded, logged, or put in the URL — only the settings above the input are, so a configured tool can be linked to.
Which metric to trust for what
Character trigram Dice is the workhorse. It is insensitive to word order, tolerant of typos and inflection, and it degrades smoothly — two near-identical paragraphs land around 0.9, two on the same topic around 0.4, two unrelated ones near 0.05. Use it for near-duplicate detection, fuzzy matching of names and titles, and for catching a caching bug that returns the wrong-but-similar entry.
Jaccard and cosine over words are stricter and more interpretable, and they are the right choice when the vocabulary is controlled — product codes, tags, error strings. Levenshtein is the only one here that cares about order, which makes it right for short strings (a slug, an ID, a command) and wrong for prose, where moving one clause costs a fortune in edits. Containment answers a different question entirely: whether one text is essentially contained in the other, which is what you want when checking whether a model's answer was copied from a retrieved chunk.
The gap this page cannot cross
Every metric above is a proxy for meaning, not a measure of it. That proxy holds up remarkably well for duplicates and remarkably badly for paraphrase, and knowing which case you are in is the whole skill. If your task is "did the model repeat itself", lexical is fine and free. If it is "did the model answer the question", lexical will mislead you in both directions — punishing a correct answer in different words, and rewarding a wrong one that reuses the question's vocabulary.