DNA to typos
The same edit-distance math powers spellcheckers and genetic alignment—letters or nucleotides, it’s edits all the way down.
Tips: Ctrl/Cmd + K focuses “A”. Ctrl/Cmd + Enter runs Compare.
When two pieces of text look almost the same, it helps to have a clear way to measure how different they really are. The Levenshtein distance calculator does exactly that. It compares two strings and tells you the smallest number of changes needed to turn one into the other. This makes it a handy tool for anyone who wants a quick, objective measure of similarity.
Levenshtein distance is also called edit distance because it counts simple editing steps: inserting a character, deleting a character, or replacing one character with another. If you change kitten to sitting, you need three edits, so the distance is 3. A lower distance means the strings are more alike; a higher distance means they are more different.
This tool lets you compare at the character level or at the word level. Character mode is best for short strings, product codes, usernames, or spelling mistakes. Word mode splits on spaces and compares whole words, which is easier to understand for sentences and paragraphs. It answers a more human question: how many word-level changes are needed?
Along with the distance, the tool shows a similarity percentage. This is a simple way to see how close two strings are relative to their length. A higher percentage means the texts are more alike. In word mode, the length is based on word count rather than characters.
Everything runs in your browser, so your text stays private. The comparison highlights the edits so you can see exactly where differences occur. This makes the tool useful as a quick string similarity checker, a text comparison helper, or an edit distance calculator for everyday tasks.
The same edit-distance math powers spellcheckers and genetic alignment—letters or nucleotides, it’s edits all the way down.
Vladimir Levenshtein introduced the metric for error-correcting codes; the internet later turned it into fuzzy search fame.
Plain Levenshtein counts “teh”→“the” as two edits. Damerau–Levenshtein treats that swap as one.
Distance is raw edits; similarity scales by length. One edit in a 3-letter word hurts more than one edit in a 30-letter string.
A dynamic-programming grid finds the minimum edits in O(m·n). The highlighted path is the story of how A becomes B.