Skip to main content
Back to Tools
Web Tools

Levenshtein Distance Calculator

Compute the edit distance between two strings with a step-by-step DP matrix visualization and edit operation breakdown. See matches, substitutions, insertions, and deletions. Runs entirely in your browser — your data never leaves your machine.

levenshtein edit-distance string algorithm diff similarity

Published June 1, 2026

All interactive tools run entirely in your browser. Your data never leaves your device.

How It Works

Enter two strings (source and target) to compute the Levenshtein edit distance — the minimum number of single-character edits (insertions, deletions, substitutions) to transform one string into the other. The tool visualizes the full dynamic programming matrix and shows each edit operation.

Features

  • Edit distance calculation: classic Levenshtein algorithm with O(mn) complexity
  • DP matrix visualization: full matrix display for strings up to 15 characters
  • Operation breakdown: color-coded match, substitute, insert, and delete operations
  • Similarity score: percentage-based string similarity (0-100%)
  • Operation summary: counts of each operation type
  • 5 examples: typo fix, case change, prefix, anagram, empty target
  • Private: runs entirely in the browser — no data transmitted

Use Cases

  • Spell checking and fuzzy matching algorithms
  • DNA sequence alignment comparisons
  • Evaluating search relevance and autocomplete quality
  • Understanding dynamic programming concepts
  • Comparing similar strings for deduplication