Password Strength Tester

Enter a password to review simple strength signals, including its length, character variety, and common patterns. The result is guidance for improving a password, not a guarantee of security.

Check a Password

Waiting for a password 0 / 6

Enter a password to see the checks that contribute to its result.

Suggestions use the entered password as a starting point, then add character variety and length.

How Password Strength Is Evaluated

This tester checks length, character types, and a small set of common patterns. These checks can highlight improvements, but they cannot prove that a password is secure.

What Makes a Password Strong?

Long, random, and unique passwords are generally harder to guess. Different websites can have different character requirements, so meet the site's rules while avoiding familiar words and personal details.

How to Improve a Weak Password

Make it longer, avoid predictable sequences, and use a password that is not used for another account. A password manager can make unique passwords easier to manage.

Why Password Length Matters

Every additional character increases the number of possible combinations. A longer password is especially helpful when it is generated randomly rather than built from a familiar phrase.

Generate a Strong Random Password Learn How to Create a Strong Password
packages = [] from js import document import secrets import string def get_password(): return document.getElementById("password-input").value COMMON_PATTERNS = ("password", "qwerty", "12345", "abcdef") def has_common_pattern(password): return any(pattern in password.lower() for pattern in COMMON_PATTERNS) def calculate_strength(password): if not password: return 0 score = 0 if len(password) >= 8: score += 1 if len(password) >= 12: score += 1 if any(character.islower() for character in password): score += 1 if any(character.isupper() for character in password): score += 1 if any(character.isdigit() for character in password): score += 1 if any(not character.isalnum() for character in password): score += 1 if has_common_pattern(password): score = max(0, score - 2) return score def update_feedback(password): feedback = document.getElementById("strength-feedback") if not password: feedback.innerHTML = "
  • Enter a password to review its strength signals.
  • " return items = [] if len(password) >= 12: items.append("Good password length.") elif len(password) >= 8: items.append("Make the password longer for stronger protection.") else: items.append("Make the password longer; short passwords are easier to guess.") character_types = sum(( any(character.islower() for character in password), any(character.isupper() for character in password), any(character.isdigit() for character in password), any(not character.isalnum() for character in password), )) if character_types >= 3: items.append("Multiple character types detected.") else: items.append("Add character variety when the website allows it.") if has_common_pattern(password): items.append("Avoid common or predictable patterns.") else: items.append("No common pattern was detected by this tool.") items.append("Use a unique password that you do not reuse on another account.") feedback.innerHTML = "".join(f"
  • {item}
  • " for item in items) def update_strength_display(score, password): label = document.getElementById("strength-label") detail = document.getElementById("strength-detail") meter = document.getElementById("strength-meter-fill") document.getElementById("strength-score").innerText = f"{score} / 6" meter.style.width = f"{score / 6 * 100}%" label.className = "strength-label" if not password: label.innerText = "Waiting for a password" detail.innerText = "Enter a password to see the checks that contribute to its result." update_feedback(password) return if score <= 2: label.innerText = "Weak" label.classList.add("weak") detail.innerText = "This password needs more length or less predictable structure." elif score <= 4: label.innerText = "Okay, but could be stronger" label.classList.add("okay") detail.innerText = "This password meets some checks, but a longer unique password is stronger." else: label.innerText = "Strong" label.classList.add("strong") detail.innerText = "This result reflects the checks above; it does not guarantee account security." update_feedback(password) def build_suggestion(password): characters = list(password) letter_indexes = [index for index, character in enumerate(characters) if character.isalpha()] if letter_indexes and not any(character.isupper() for character in characters): index = secrets.choice(letter_indexes) characters[index] = characters[index].upper() if letter_indexes and not any(character.islower() for character in characters): index = secrets.choice(letter_indexes) characters[index] = characters[index].lower() if not any(character.islower() for character in characters): characters.append(secrets.choice(string.ascii_lowercase)) if not any(character.isupper() for character in characters): characters.append(secrets.choice(string.ascii_uppercase)) if not any(character.isdigit() for character in characters): characters.append(secrets.choice(string.digits)) if not any(not character.isalnum() for character in characters): characters.append(secrets.choice("!@#$%^&*()-_=+[]{}")) pools = string.ascii_lowercase + string.ascii_uppercase + string.digits + "!@#$%^&*()-_=+[]{}" while len(characters) < 12: characters.append(secrets.choice(pools)) return "".join(characters) def update_suggestion(): password = get_password() if password: document.getElementById("suggested-password").value = build_suggestion(password) else: document.getElementById("suggested-password").value = "" def test_password(event=None): password = get_password() update_strength_display(calculate_strength(password), password) update_suggestion() def generate_suggestion(event=None): password = get_password() if password: document.getElementById("suggested-password").value = build_suggestion(password) def copy_suggestion(event=None): suggestion = document.getElementById("suggested-password") if suggestion.value: suggestion.select() document.execCommand("copy")