Secure · Expressive · Instant

Craft passwords that match your rules.

Toggle exactly which character families should appear, set your length, and let secure Python code mix the perfect combination using cryptographically strong randomness.

WARNING: Make sure to copy your password before navigating away, as it will not be saved!

Ready when you are.

packages = [] from js import document, navigator import secrets import string def get_controls(): return { "length": int(document.getElementById("length").value), "lowercase": document.getElementById("lowercase").checked, "uppercase": document.getElementById("uppercase").checked, "numbers": document.getElementById("numbers").checked, "symbols": document.getElementById("symbols").checked, } def update_status(message, error=False): status_element = document.getElementById("status") status_element.innerText = message if error: status_element.classList.add("error") else: status_element.classList.remove("error") def generate_password(event=None): controls = get_controls() pools = [] if controls["lowercase"]: pools.append(string.ascii_lowercase) if controls["uppercase"]: pools.append(string.ascii_uppercase) if controls["numbers"]: pools.append(string.digits) if controls["symbols"]: pools.append("!@#$%^&*()-_=+[]{};:,.?/|") if not pools: document.getElementById("password-output").value = "" update_status("Select at least one character type.", error=True) return alphabet = "".join(pools) password = "".join(secrets.choice(alphabet) for _ in range(controls["length"])) document.getElementById("password-output").value = password update_status("Fresh password generated.") async def copy_password(event=None): value = document.getElementById("password-output").value if not value: update_status("Generate a password before copying.", error=True) return try: await navigator.clipboard.writeText(value) update_status("Password copied to clipboard.") except Exception: update_status("Clipboard is unavailable in this browser.", error=True)