TextyConverterbeta
⌘K

String Similarity %

Compute the Levenshtein edit distance and similarity percentage between two strings.

Enter both inputs to compare.

About String Similarity %

Levenshtein distance counts the minimum number of single-character edits (insertions, deletions, or substitutions) needed to transform one string into another. This tool reports the raw distance and converts it to a percentage: 100% means identical, 0% means completely different.

When to use it

  • Measuring how close two strings are (typos, near-duplicates)
  • Building fuzzy match scores in a UI
  • Comparing names or addresses for deduplication
  • Detecting suspiciously similar usernames or domains

How it works

A standard dynamic-programming algorithm builds a (lenA × lenB) matrix where each cell holds the minimum edit distance for the corresponding prefixes. The final cell is the full edit distance. Similarity % is computed as (1 − distance / max(lenA, lenB)) × 100.

Examples

Three edits: k→s, e→i, +g at end
A: kitten
B: sitting
Distance: 3, Similarity: 57.1%

Frequently asked questions

What counts as one edit?
Insertion of one character, deletion of one character, or substitution of one character. Transposition of adjacent characters counts as 2 edits (one delete + one insert) — for transposition-aware distance use Damerau-Levenshtein.
Is the comparison case-sensitive?
Yes by default. Toggle the case-insensitive option to lowercase both inputs first.
Is this related to fuzzy search?
Yes — Levenshtein distance is the foundation of many fuzzy-search algorithms. Tools like Fuse.js use related distance metrics to rank matches.

Related tools