Levenshtein distance calculator

Calculate the Levenshtein distance between two strings, that is, the minimum number of insertions, deletions or substitutions needed to turn one into the other. It's a measure used in spell checking and fuzzy search.

Example:

How it works

The algorithm uses classic dynamic programming: it builds a matrix where each cell represents the minimum cost of turning a prefix of the first string into a prefix of the second, combining insertion, deletion and substitution. This distance is the standard measure for automatic spell correction, typo detection, or fuzzy matching of two similar identifiers (for example, two nearly identical email addresses).

How is this different from the “Similarity percentage” tool?

Both tools use the same underlying algorithm. This one shows the raw distance (a number of operations) along with the length of each string, while the similarity tool converts that distance directly into a percentage that's easier to interpret at a glance.

Is the Levenshtein distance case-sensitive?

Yes, the comparison is done character by character with no normalization: “Cat” and “cat” therefore have a distance of 1 (one case substitution).

100% local processing: the strings you compare never leave your browser, and the calculation happens entirely on your device via WebAssembly.