Levenshtein Distance Calculator

Find the minimum number of edits needed to transform one string into another, with a full DP matrix and highlighted edit path.

Strings to Compare

Enter two strings and click Compute to see the DP matrix.

Copied!

Summary

Find the minimum number of edits needed to transform one string into another, with a full DP matrix and highlighted edit path.

How it works

  1. Enter the source string in the left input and the target string in the right input.
  2. The tool builds an (m+1) x (n+1) dynamic programming matrix in real time.
  3. Each cell stores the minimum edits needed to transform the substring up to that point.
  4. The bottom-right cell is the final Levenshtein distance between the two strings.
  5. The optimal edit path is highlighted in the matrix so you can trace each operation.
  6. Similarity percentage is computed as 1 minus (distance / max string length).

Use cases

Frequently Asked Questions

Related tools

Last updated: 2026-05-23 · Reviewed by Nham Vu