Levenshtein distance, also called edit distance, counts the minimum number of single-character insertions, deletions, and substitutions needed to change one string into another.
For example, the distance between kitten and sitting is 3:
- Substitute
kwiths. - Substitute
ewithi. - Add
gat the end.
From distance to similarity
Raw edit distance grows with the length of the strings. A matching tool can normalize it into a similarity score where 100% means identical values.
A threshold controls the result:
- A high threshold returns fewer, closer matches.
- A lower threshold finds more typo variants and more false positives.
Levenshtein works well for misspellings, missing characters, and small edits in names, addresses, company names, or product titles. It does not understand meaning or identity.
Levenshtein compared with Jaro-Winkler
Levenshtein measures the number of edits across the whole string. Jaro-Winkler gives more weight to a shared prefix and can be useful for short names.
Neither algorithm should be the default for emails, domains, IDs, or phone numbers. Use Exact or a data-specific Smart processor for those identifiers.
Use Levenshtein in Datablist
In the Duplicates Finder, select a text property, choose Distance, then select Levenshtein and set the similarity threshold. Distance matching is available on paid plans.
The tested name workflow in the list deduplication guide uses Levenshtein at 90% and shows why name-only groups still need review. See the Duplicate Finder reference for the complete settings.