EditSafely

String Levenshtein Distance

Count the single-character edits between the first two lines. Runs entirely in your browser, so your data never leaves your device.

0 chars · 0 lines

Output

The result appears here as you type.

How to use String Levenshtein Distance

  1. 1. Paste two lines to compare. Enter the two strings you want to compare on the first two lines of the input pane, such as a misspelled word and its correct spelling.
  2. 2. Read what the tool computes. String Levenshtein Distance finds the minimum number of single-character insertions, deletions, or substitutions needed to turn the first line into the second, unlike Hamming distance which requires equal lengths.
  3. 3. Read the edit distance. The output is a single number representing the fewest edits required, so a small number means the two strings are close and a large number means they are quite different.

When to use String Levenshtein Distance

String Levenshtein Distance measures how many single-character edits separate two strings of any length, including insertions and deletions, not just substitutions. Use it whenever you need a numeric measure of how similar two pieces of text are.

  • Building spell-check suggestions. You are implementing a simple spell checker and want to rank dictionary words by how close they are to a misspelled input, since a low edit distance usually means a likely correction.
  • Deduplicating near-identical records. A customer database has entries like 'Jon Smith' and 'John Smith' that are probably the same person typed slightly differently, and the edit distance quantifies how close they are.
  • Fuzzy matching search queries. A search feature needs to tolerate typos, so comparing the query against candidate terms with edit distance lets you accept close matches instead of requiring an exact string.
  • Grading a typing or transcription exercise. You want to score how accurately someone transcribed a passage by comparing their typed text against the original and reporting the number of character-level differences.

Examples

kitten to sitting

Input

kitten
sitting

Output

3

About the String Levenshtein Distance tool

String Levenshtein Distance does its work locally, right in the browser. Count the single-character edits between the first two lines. There is no upload step, no queue and no account, and your data never travels over the network.

It belongs to the String Tools collection on EditSafely, a set of 159 small, focused String utilities that share the same instant, private workspace.

There is nothing to configure. Provide the input and the result appears on its own. A worked example further down the page shows exactly what the tool produces for a real input.

Running locally also makes the tool fast and dependable: results appear as you type or drop a file, there is no server outage that can take it down mid-task, and confidential data can be processed without a second thought.

Frequently asked questions

Does String Levenshtein Distance cost anything?

Yes, it is completely free. All 2,658 tools on EditSafely work without an account, a subscription or usage limits.

Is it safe to paste sensitive or confidential data?

No data leaves your device. The whole tool is JavaScript that runs inside your browser tab, so there is no upload, no server-side processing and no log of what you did. If you disconnect from the internet after the page loads, it keeps working.

How much text can I process at once?

There is no fixed limit. Because the work happens on your own device rather than on a shared server, the practical ceiling is your machine's memory, which comfortably handles inputs far larger than typical online tools allow.

Do I need to sign up or install anything?

Nothing to install and no account needed. Open the page in any up-to-date browser, including on a phone or tablet, and the tool is ready.

How do I use the result?

The output panel has a one-click copy button, and you can keep refining the input while you work; the result updates in place as you type.