Levenshtein distance
Measure the edit distance between two strings, plus a similarity percentage.
Levenshtein distance
The Levenshtein distance is the smallest number of single-character edits — insertions, deletions and substitutions — needed to turn one string into another. Paste a string on each side and this tool reports that distance, along with a normalized similarity ratio computed as (longest length minus distance) divided by the longest length: 100% means the two strings are identical, and the percentage falls as they diverge.
Edit distance is the metric behind spell-checkers, fuzzy search, deduplication and DNA sequence comparison. It answers "how far apart are these two values" in a way that a plain equality check can't — "kitten" and "sitting" differ by 3 edits, which is far closer than two unrelated words. Comparing product names, SKUs, headings or short user inputs for near-duplicates is exactly what it is built for.
Three options tune the comparison. Ignore case treats "Hello" and "hello" as equal. Trim whitespace strips leading and trailing spaces from each side before comparing. Compare by lets you switch from characters to words: word mode measures how many whole words must change, which is the right unit for comparing sentences rather than tokens. Very long inputs are handled safely — because the calculation grows with the product of the two lengths, extremely large pairs return a short notice instead of freezing the tab.
Everything runs locally in your browser. The two strings are never uploaded, so comparing confidential names, keys or unpublished text is completely private.