String Similarity Calculator
Compare two strings by Levenshtein edit distance, word-level edit distance, Jaro-Winkler, Dice on character pairs, Jaccard on words and longest common subsequence.
Free · No sign-up · Your inputs stay in your browser
Input
Compare two strings (Levenshtein, Jaro-Winkler and more)
Output
64.0% similar by edit distance
| Levenshtein distance | 9 edits (64.0%) |
|---|---|
| Word-level edit distance | 3 words |
| Jaro-Winkler | 0.8622 |
| Dice coefficient (bigrams) | 82.6% |
| Jaccard (words) | 66.7% |
| Longest common subsequence | 17 characters |
Levenshtein counts single-character insertions, deletions and substitutions; it is what fuzzy search and 'did you mean' suggestions are built on (PHP has levenshtein() and similar_text()). Jaro-Winkler rewards a shared prefix and suits short strings such as names. Dice on character pairs and Jaccard on words ignore order, so they recognise reordered phrases that edit distance scores as very different.
Runs in this browser. Nothing you paste is sent to a server.
About this tool
Method, assumptions, practical next steps, and limits.
Which measure to use
Levenshtein suits typos and short strings, and is what fuzzy search and "did you mean" are built on; PHP has levenshtein() built in. Jaro-Winkler rewards a common prefix and is used for matching names. Dice and Jaccard ignore word order, so they recognise "kitten on the mat" and "on the mat, kitten" as close where edit distance does not.
Performance
Levenshtein costs time proportional to the product of the lengths, fine for names and titles, slow for documents. For large-scale fuzzy matching, databases offer trigram indexes, such as PostgreSQL's pg_trgm.