Changing one digit at the end of a password feels like a fresh start, but it rarely is. The Password Similarity Comparator measures how alike two passwords really are, so you can see whether a "new" credential is just a minor changes to the old one. Enter a reference password and a candidate, and you get a similarity score, an edit distance and a clear verdict on password reuse.
How the Password Similarity Comparator Works
A password similarity checker goes beyond asking whether two strings are identical. It quantifies how much of one password survives inside the other, which is exactly the question an attacker asks after a leak. If one account is compromised, automated tools try every predictable variation of the leaked secret on your other accounts, so a candidate that scores high against your current password is only slightly safer than reusing it. The keyboard walk detector checks your input against current best practices and flags anything worth fixing.
The Password Similarity Comparator runs a character-level comparison and reports four things: the Levenshtein distance, a similarity percentage, the longest common substring and a short security rating. Everything is calculated in your browser, so you can work offline and no password has to be sent anywhere.
Levenshtein Distance and Edit Distance
Levenshtein distance, also called edit distance, is the minimum number of changes needed to turn one password into the other. A change is an insertion, a deletion or a substitution (replacing a character). Turning "Granite&Fern58" into "Granite&Fern59" takes one substitution, so the distance is 1. A distance of 0 means the two passwords are identical, and a large distance means the passwords share little structure.
Longest Common Substring
The longest common substring is the longest unbroken run of characters that appears in both passwords. It catches reuse that edit distance can understate, such as a long base word wrapped in new characters at both ends. A long shared run is the clearest sign that a base word was recycled.
Matching Prefix and Matching Suffix
A matching prefix counts how many leading characters two passwords share, and a matching suffix counts the trailing ones. People often keep a stable beginning and only rotate the ending, for example a year or a counter, so these two figures expose that habit immediately.
Character Class Analysis
Character class analysis compares how many uppercase letters, lowercase letters, digits and symbols differ between the two passwords. If only the digits change while every letter and symbol stays put, the password mutation is shallow, no matter how long the password looks.
Password Similarity Score: The Formula Behind the Percentage
The password similarity score turns the edit distance into a percentage you can compare across any pair of passwords. It divides the distance by the length of the longer password and subtracts the result from one: You can check your common password blacklist in seconds with a free tool that runs entirely in your browser.
$$\text{Similarity} = \left(1 - \frac{d}{\max(L_1,\ L_2)}\right) \times 100$$
Here \(d\) is the Levenshtein distance and \(L_1\), \(L_2\) are the two password lengths. A similarity score of 100 means identical passwords, and a score near 0 means nothing useful carries over. The comparator then maps that number to a security rating: above 80 is a red flag, above 90 is effectively password reuse, and a healthy set of passwords stays under 30.
Worked Example: Password Comparison Against a Reference Password
Take Granite&Fern58 as the reference password. It has 14 characters. The table below shows a password comparison against five candidates, using the formula above.
| Candidate | Length | Levenshtein distance | Longest common substring | Similarity | Verdict |
|---|---|---|---|---|---|
| Granite&Fern59 | 14 | 1 | 13 | 92.9% | Effectively reused |
| Granite@Fern58 | 14 | 1 | 7 | 92.9% | Effectively reused |
| Granite&Fern58Admin | 19 | 5 | 14 | 73.7% | Too similar |
| Basalt&Fern58 | 13 | 6 | 7 | 57.1% | Weak variation |
| Fern&Granite58 | 14 | 10 | 7 | 28.6% | Acceptable |
| vQ7#kd!Lm2xR | 12 | 14 | 0 | 0.0% | Independent |
For "Granite&Fern59" the distance is 1 and the longer length is 14, so the score is \((1 - 1/14) \times 100 = 92.9\). The two single-character edits, a changed digit and a swapped symbol, both score 92.9%, even though the second keeps a shorter common substring. Reordering the two words in "Fern&Granite58" drops the score to 28.6%, yet a human attacker would still recognise both words, which is why you should read the common substring alongside the percentage. Only the random string, which shares no run of characters with the reference, scores 0.0%.
Checking a Password Reset Rule with a Password Difference Checker
Ines, a sysadmin at a 140-seat accounting firm, has to justify a new rotation rule to the auditors. Her question is concrete: would a minimum difference of 6 in the password validator actually stop people from nudging their old password? She opens the comparator and pastes in a real pattern she saw during last quarter's review as the reference password: Cobalt-Heron-4417, 17 characters.
First she enters Cobalt-Heron-4418, the "add one" habit. The password similarity calculation returns a Levenshtein distance of 1 and a similarity of 94.1%, which the comparator rates as effectively reused. Next she tries Cobalt-Marsh-4418, where the animal changed too. The distance rises to 5 and similarity falls to 70.6%, still above the 30% ceiling she wants for the policy. A third entry, Cobalt-Heron-4417!x, only adds two characters, so the distance is 2 and the score is 89.5%.
| New password | Distance | Similarity | Passes a minimum of 6? |
|---|---|---|---|
| Cobalt-Heron-4418 | 1 | 94.1% | No |
| Cobalt-Heron-4417!x | 2 | 89.5% | No |
| Cobalt-Marsh-4418 | 5 | 70.6% | No |
| Wk9$tuBa2nLr-Qe5v | 16 | 5.9% | Yes |
The result settles the decision. Even swapping a whole word misses a threshold of 6 by one edit, so a minimum of 6 would block all three lazy variants while an independent password from a generator, at distance 16 and 5.9% similarity, passes easily. Ines sets min-password-difference to 6 in her draft policy, then reruns the same four pairs against a threshold of 7 to confirm that nothing legitimate gets rejected, and attaches the table to her audit notes as evidence for the rule.
Why Password Reuse and Similar Passwords Are Risky
Reusing a password is dangerous, and reusing a close variant is nearly as bad. Attackers keep leaked credentials from earlier breaches and apply rule-based mutations to them: adding a symbol, bumping a number, swapping "a" for "@". A password similarity analysis that shows 90% or more similarity tells you those rules would succeed on the first or second guess.
Credential Stuffing and Password Spraying
Credential stuffing replays known username and password pairs against many sites, while password spraying tries a few likely passwords against many accounts. Both thrive on predictable patterns such as incrementing numbers, seasons and company names. The fewer patterns your passwords share, the less either technique can reuse a single leak.
Weak Variations and Account Compromise
Typical weak variations include appending the current year, moving a digit to the front, repeating a service name as a prefix and following keyboard patterns. Each one belongs to the family of incremental password changes and sequential substitutions that look like effort but leave the password easy to guess. After a single account compromise, similar passwords also allow lateral movement from one system to the next inside a company.
Bulk Analysis for Enterprise Password Policy and Compliance Audits
Security teams do not compare passwords one pair at a time. A bulk analysis mode checks one reference password against a whole list, which you can paste in, upload as a CSV or TXT file, or add with drag and drop. You can download a detailed report in TXT, CSV or JSON format.
- Check new password proposals against known weak passwords.
- Find users who rotate passwords with minor alterations during compliance audits.
- Confirm that reset flows enforce a meaningful change and a sound password policy.
- Review accounts exported from Active Directory or a password manager as part of cybersecurity audits.
Frameworks such as NIST SP 800-63B, ISO 27001 and SOC 2 expect new passwords to differ from earlier ones, and similarity measurement gives that expectation a number. It also supports identity and access management programmes that want better credential hygiene across an enterprise without storing anyone's secrets.
Similarity Based Password Validator Settings in Directory Servers
The same idea is built into directory servers. A similarity based password validator decides whether a proposed password is acceptable by measuring how similar it is to the user's old password with the Levenshtein algorithm. A password validator like this prevents new password choices that only slightly modify the old password.
The min-password-difference Property
The key setting is min-password-difference, an integer that sets the smallest allowed edit distance between old and new passwords. A value of 0 accepts any change, so even an identical password passes. A value of 5 would reject "Granite&Fern59" but accept "Basalt&Fern58". The validator only works when the system can see the user's current password, which is why the password policy must also require the old password at change time.
| Property | Meaning | Allowed values |
|---|---|---|
| enabled | Turns the password validator on or off | true or false |
| min-password-difference | Minimum difference between old and new password | Integer, 0 and above |
String Comparison vs Password Similarity: Why Hashes Fall Short
An exact-match string comparison answers a yes-or-no question, while this tool answers "how close?". Exact checks done carelessly are a risk in their own right: a byte-by-byte loop that stops at the first mismatch, known as short-circuiting, leaks timing that timing attacks can exploit. The safer pattern is a constant time check that hashes both values (for example with SHA256) and combines the hashes with XOR.
A hash hides closeness, though: changing one character produces a completely different digest, so no similarity score can be read from it. That is why the comparator works on plaintext held in your browser only, keeps nothing, and sends nothing, so security, privacy and authentication secrets stay on your device.
How to Create Unique Passwords That Pass a Password Similarity Checker
The best defence against similarity-based attacks is a random password from a password generator that draws on a large character set and never repeats patterns. Store each result in a password manager and keep every one unrelated to the rest.
Password Hygiene Habits That Lower Similarity
- Never reuse a base password or base word across accounts.
- Skip seasons, years and service names in unique passwords.
- Re-run your vault through a password difference checker after every rotation.
- Aim for less than 30% similarity between every pair, which is a practical password hygiene target.
It is free to run, takes seconds and turns a vague worry about weak password habits into a measurable risk you can reduce, whether you are a single user protecting a personal account or an administrator reviewing policy for a whole organisation. A password comparison tool and some password matching discipline will help you compare passwords before an attacker does, and the results feed straight into password policy decisions about credentials and the algorithm behind them.
Frequently Asked Questions
- What algorithm calculates the similarity score?
- Levenshtein edit distance -- the minimum number of single-character insertions, deletions, or substitutions needed to turn Password A into Password B. The similarity percentage is derived from that distance relative to the longer password's length.
- Why does similarity between two passwords matter?
- If one of your passwords ever leaks in a breach, attackers don't just try that exact value against your other accounts -- they also try common small variations (appending a digit, changing the last symbol, swapping the year). A high similarity score means your "new" password isn't offering much independent protection.
- What counts as "too similar"?
- There's no universal cutoff, but as a rule of thumb: identical or a handful of edits apart (this tool flags 70%+ similarity as "Very Similar") means the two passwords offer little independent protection against credential-stuffing style guessing.
- Should I use this to check a new password against an old, leaked one?
- Yes -- that's a strong use case. If you know a password was involved in a breach, compare your proposed replacement against it here to confirm you're not just making a minor tweak that an attacker's mutation rules would still catch.
- Can I compare more than two passwords at once?
- No -- this tool compares exactly one pair at a time, Password A against Password B. If you want to audit a whole list of passwords for weakness (not pairwise similarity), the Bulk Password Strength Auditor is the tool for that instead.
- Does this tool work on mobile?
- Yes. The comparator is fully responsive and works the same way -- live, in-browser, no server involved -- on a phone or tablet as it does on desktop.
- Are both passwords sent anywhere?
- No. The comparison happens entirely in your browser -- neither password is transmitted to a server, logged, or stored.