Most password strength estimators were designed around English dictionaries and the QWERTY layout. If your users type Arabic, that blind spot is real. I measured it.
The test
I ran a few realistic passwords through zxcvbn 4.4.2 (the standard JS estimator) and through a localized auditor I built:
| Password | zxcvbn 4.4.2 (0-4) | This API |
|---|---|---|
ضصثقف123 | 2 | WEAK (0) |
شسيبل | 1 | WEAK (7) |
ضصثقفغعهخ | 3 | WEAK (7) |
Ahmed@01012345678 | 3 | WEAK (37) |
a7med.3ali | 3 | WEAK (38) |
azertyuiop | 1 | WEAK (0) |
k9#Xv!2mQ@7zLp$w | 4 | STRONG (100) |
zxcvbn scores range from 0 to 4, and 3 means "safely unguessable". A full row of the Arabic keyboard, a name followed by an Egyptian mobile number, and an Arabizi name (a7med.3ali) all reach that level. An attacker's wordlist, however, contains exactly these habits.
(One nuance: ضصثقف123 itself gets only 2/4, so the problem is not that every Arabic password is rated strong. It is that the estimator has no model of Arabic keyboard rows, local names or phone formats, so the result depends on luck.)
How the detection works
1. Keyboard adjacency grids. Each layout (QWERTY, AZERTY, Arabic) is a grid of (row, column) positions. Two keys are adjacent if both their row and column differ by at most one. A run of three or more adjacent keys is a walk.
def is_adjacent(a, b, grid): (r1, c1), (r2, c2) = grid[a], grid[b] return abs(r1 - r2) <= 1 and abs(c1 - c2) <= 1 and (a != b) A walk is charged almost the whole entropy of its characters (about 6 bits stay for the start key and direction), instead of a flat discount. That is why ضصثقفغعهخ drops from "moderate" to "weak".
2. Dictionary segmentation with substitutions. The password is normalized (Arabic alef/taa-marbuta forms, diacritics, Arabic-Indic digits), then segmented against word lists with three substitution tables: classic leetspeak (@=a, 0=o), 1=l/i variants, and Arabizi (7=h for ح, 3=a for ع, 5=k for خ). Each matched word is charged length × bits_per_char − log2(dictionary size).
3. Personal data. Egyptian mobile numbers (01[0125] + 8 digits) are masked out of the other detectors so their digits are not counted twice, and cost a fixed, small amount of entropy, since a phone number is something an attacker can learn.
4. Breach check with k-anonymity. Only the first 5 hex characters of the SHA-1 hash leave your machine:
const hash = (await sha1(password)).toUpperCase(); const res = await fetch("https://api.pwnedpasswords.com/range/" + hash.slice(0, 5)); const hit = (await res.text()).split("\n").find(l => l.startsWith(hash.slice(5))); Limits (honestly)
- It is an estimate based on entropy and patterns, not a cracker. Words missing from the dictionaries are not discounted.
- Passphrases of uncommon words are scored per character.
- The dictionaries are small (about 10k common passwords and 240 names), so coverage grows only as you extend them.
Try it
- Free, in-browser version (the password never leaves your device): GitHub repo
- REST API for server-side validation, with a 7-day trial: Zyla API Hub
If you call the API, do it from your backend so the key stays secret, and read the provider's privacy notes before sending real credentials.
