String Similarity
Compare two strings to get their Levenshtein edit distance and a similarity percentage instantly — runs 100% in your browser with no upload.
The edit distance is the minimum number of single-character insertions, deletions, or substitutions to turn one string into the other.
Damerau–Levenshtein also counts swapping two adjacent characters (like "form" ↔ "from") as a single edit — better for catching typos.
🔒 Both strings are compared in your browser — nothing is uploaded.
What this tool does
String Similarity compares two pieces of text and reports two numbers live as you type. The first is the Levenshtein distance: the minimum number of single-character insertions, deletions, or substitutions needed to turn one string into the other. The second is a similarity percentage, computed as 1 - distance / max(length), so identical strings score 100% and two completely different strings of the same length score 0%. It works on any text — names, product SKUs, code snippets, or full sentences.
How the distance is calculated
The tool uses the classic dynamic-programming Levenshtein algorithm, which considers every possible edit path and returns the cheapest one. Because it counts substitutions as a single edit, changing "cat" to "bat" costs 1, while turning "kitten" into "sitting" costs 3. Alongside it the tool shows the Damerau distance, which additionally counts a swap of two adjacent characters (like "form" and "from") as a single edit — closer to how real typos happen. The comparison is case-sensitive and Unicode code points are treated as individual characters. Both values recalculate the instant either box changes, so you can experiment with spellings, typo corrections, or fuzzy matches without pressing a button.
Frequently asked questions
What exactly is Levenshtein distance?
It is the smallest number of single-character edits — insertions, deletions, or substitutions — required to change one string into another. For example, "kitten" to "sitting" is a distance of 3.
How is the similarity percentage calculated?
It is 1 minus the edit distance divided by the length of the longer string, shown as a percentage. Identical strings are 100%, and two equally long strings with no characters in common are 0%. Two empty strings count as 100% identical.
Are the strings I enter uploaded anywhere?
No. Both strings are compared entirely in your browser with JavaScript. Nothing you type is sent, stored, or uploaded to any server.