A simple but secure password generator using Python’s secrets
module.
- Configurable password length
- Option to include/exclude:
- Uppercase letters
- Lowercase letters
- Digits
- Symbols
- Similar-looking characters (e.g. O/0, l/1)
- Cryptographically secure randomness
This tool helps users create strong, unpredictable passwords that resist brute-force attacks and dictionary-based guessing.
Run the script in a terminal:
python password_generator.py
Then enter the desired password length.
Secure Password Generator
Enter password length (e.g. 12): 16
Generated Password: Vt6$kM8@ywF9zPL#x2r
- Uses Python's
secrets
module — suitable for generating cryptographic secrets - Avoids predictable randomness from
random
oruuid