Category 10 — String Search & Similarity
Measure edit distance between two strings — insertions, deletions, and substitutions.
String A and a second into String B — results update as you type.Edit distance stat: the minimum number of single-character edits needed to turn one string into the other.Insertions, Deletions, and Substitutions to see how that distance breaks down by edit type.Alignment — matching characters line up, while substitutions, insertions, and deletions are highlighted.kitten / sitting or Saturday / Sunday to load a ready-made pair.Similarity percentage as a quick fuzzy-match score (100% = identical).Score how close two strings are to spot near-duplicates, merge records, or match names across datasets.
Measure how far a word is from a dictionary entry — a small distance usually means a simple typo.
The two-line, color-coded view shows the actual edit script — which characters changed, appeared, or vanished — not just a number.
Edit distance underlies DNA, RNA, and protein sequence alignment — a familiar primitive for genetics work.
Get a quick, objective gauge of how much two texts or code snippets differ before diving into a full diff.
Everything runs in your browser. Nothing is uploaded, logged, or sent to a server — safe for sensitive strings.
The minimum number of single-character edits — insertions, deletions, or substitutions — required to transform one string into another. For example, kitten to sitting is 3.
This tool uses the Wagner–Fischer dynamic-programming algorithm. It fills an (m+1) × (n+1) matrix where each cell holds the cheapest way to align the two prefixes so far, then backtracks to reconstruct the edit path.
Substitute k → s, substitute e → i, then insert g at the end. That's three single-character edits, the minimum possible.
Yes. Each edit has a cost of 1, so A vs a is a substitution, and every space or punctuation mark counts as a character too.
It's 1 - distance / max(lengthA, lengthB), shown as a percent. Two identical strings score 100%, while completely different strings approach 0%.
It operates on UTF-16 code units. Most text works as expected, but characters outside the Basic Multilingual Plane — like emoji — count as two units each, which affects the distance.
Never. All computation happens locally in JavaScript. Your strings are not sent to, stored on, or logged by any server.