Password Generator

Use this free online password generator to create strong, secure passwords that are resistant to guessing and brute-force attacks. Customize the character set, exclude ambiguous or bracket characters, prevent repeated characters, and check the entropy-based strength of your generated passwords.

Password Length (1-100): 16
1100
Include Lower Case (a-z) Include Upper Case (A-Z) Include Numbers (0-9) Include Symbols
Exclude Ambiguous Characters (iIl1L| o0O `'\-"_:;.,) Exclude Brackets (<>()[]{}) No Repeated Characters

What Is a Password?

A password is a secret string of characters used to authenticate a user's identity and grant access to a system, account, or resource. Passwords are the most common form of authentication and serve as the first line of defense against unauthorized access. A strong password is one that is difficult for attackers to guess or crack through automated methods such as brute-force attacks, dictionary attacks, or social engineering.

Modern security best practices recommend using passwords that are long, complex, and unique for each account. Password managers help users generate and store strong passwords without needing to memorize them all.

Password Strength

Password strength is a measure of how resistant a password is to guessing and brute-force attacks. It is primarily determined by two factors: length and complexity (the variety of character types used). Longer passwords with a mix of uppercase letters, lowercase letters, numbers, and symbols are exponentially harder to crack.

The strength of a password is quantified using entropy, measured in bits. Each additional bit of entropy doubles the number of possible passwords an attacker must try. As a general guideline:

  • Very Weak (< 30 bits): Can be cracked almost instantly.
  • Weak (30-49 bits): Vulnerable to moderate computational attacks.
  • Fair (50-69 bits): Reasonable for low-security applications.
  • Strong (70-99 bits): Suitable for most online accounts and services.
  • Very Strong (≥ 100 bits): Resistant to large-scale brute-force attacks, suitable for high-security uses.

How to Create a Secure Password

Follow these rules to create passwords that are both strong and practical:

  • Use at least 12-16 characters. Length is the most important factor. Each additional character exponentially increases the number of possible combinations.
  • Mix character types. Combine uppercase letters, lowercase letters, numbers, and symbols to maximize complexity.
  • Avoid personal information. Never use names, birthdays, addresses, or other easily guessable details.
  • Avoid common patterns. Do not use sequential characters (12345), repeated characters (aaaa), or keyboard patterns (qwerty).
  • Exclude ambiguous characters. Characters like iIl1L|o0O can be confused with each other, especially when handwritten or displayed in certain fonts.
  • Use a unique password for every account. Never reuse passwords. A breach on one site should not compromise your other accounts.
  • Consider using a passphrase. A sequence of random words (e.g., correct horse battery staple) can be both strong and memorable.
  • Use a password manager. Generate and store complex passwords without needing to memorize them. You only need to remember one strong master password.

Password Entropy

Password entropy quantifies the unpredictability of a password in bits. It is calculated using the formula:

Entropy = log2(charsetSizelength) = length × log2(charsetSize)

Where charsetSize is the number of possible characters (e.g., 26 for lowercase only, 52 for mixed case, 62 with numbers, 95 with all printable ASCII characters) and length is the password length. When "No Repeated Characters" is selected, the formula adjusts since each subsequent position has one fewer available character.

A password with 80 bits of entropy is considered secure against most adversaries. For reference, a password of 16 random characters from a 95-character set has approximately 105 bits of entropy.

How to Protect Your Password

A strong password is only effective if it is properly protected. Follow these practices to keep your passwords secure:

  • Never share your password with anyone, including friends, family, or IT staff. Legitimate organizations will never ask for your password.
  • Enable two-factor authentication (2FA) whenever possible. Even if your password is compromised, an attacker would still need the second factor.
  • Change passwords promptly if you suspect they have been compromised or after a data breach notification.
  • Use a password manager to store passwords securely encrypted. Avoid writing passwords down or storing them in plain text files.
  • Be cautious of phishing attempts. Always verify the URL before entering your password, and never enter credentials on untrusted websites.
  • Avoid using public computers or unsecured Wi-Fi networks for sensitive accounts. If you must, use a VPN and clear all session data afterward.

What to Look for in a Password Generator

Not all password generators are created equal. When choosing a password generator, consider the following features to ensure you are getting genuinely secure passwords:

  • Cryptographic randomness: The best password generators use cryptographically secure random number generators (CSPRNGs) rather than standard Math.random(). This ensures the output cannot be predicted even if the algorithm is known.
  • Customizable character sets: A good generator lets you choose exactly which character types to include (lowercase, uppercase, numbers, symbols) and which to exclude (ambiguous characters, brackets).
  • Length flexibility: You should be able to set the password length to match the requirements of different websites and services. Some sites require at least 8 characters, others allow up to 100 or more.
  • Entropy display: The generator should show the entropy of the generated password in bits, so you can quantify its strength objectively rather than relying on vague descriptors.
  • No-repetition option: Preventing repeated characters can help avoid passwords that are harder to guess, though it slightly reduces the total search space.
  • Client-side generation: The best password generators work entirely in your browser, never sending passwords over the network. Your generated passwords should never leave your machine.
  • Copy-to-clipboard: One-click copying makes it easy to paste your new password into the target website without displaying it on screen for longer than necessary.

Common Password Mistakes to Avoid

Even with a strong password generator, users often undermine their security through common mistakes. Avoid these pitfalls:

  • Using the same password everywhere: Credential stuffing attacks exploit reused passwords. If one site is breached, attackers try the same email/password combination on hundreds of other sites.
  • Incrementing passwords: Changing Password1 to Password2 after a breach is not a real change. Attackers can easily guess simple increments.
  • Writing passwords on sticky notes: Physical security is just as important as digital security. A password on a monitor can be seen by anyone walking by your desk.
  • Storing passwords in plain text: Never store passwords in unencrypted text files, spreadsheets, or emails. Use a dedicated password manager with encryption.
  • Ignoring password strength meters: If a website's strength meter shows your password as weak or fair, choose a stronger one. Many sites enforce minimum strength requirements.
  • Using personal information: Birthdays, anniversaries, pet names, and addresses are easily discovered through social media and can be guessed or looked up by attackers.

Related Calculators

External Resources

Frequently Asked Questions

What is a password generator?
A password generator is a tool that automatically creates strong, random passwords based on user-defined criteria such as length, character types, and exclusions. It eliminates the need to think up passwords yourself and ensures that every password you generate has maximum entropy for its length and character set.
How does this password generator work?
This password generator constructs a character set based on your selected options (lowercase, uppercase, numbers, symbols) and exclusions (ambiguous characters, brackets). It then randomly selects characters from that set to build a password of your chosen length. When "No Repeated Characters" is enabled, it uses a shuffle algorithm to ensure no character appears more than once.
What makes a password strong?
A strong password is long, complex, and unpredictable. It should contain at least 12-16 characters drawn from a mix of character types (uppercase, lowercase, numbers, symbols). The strength is quantified by entropy in bits, which measures how many guesses an attacker would need to crack it. Higher entropy means a stronger password.
How is password entropy calculated?
Password entropy is calculated as E = L × log2(C), where L is the password length and C is the size of the character set. For example, a 16-character password using all 95 printable ASCII characters has 16 × log2(95) ≈ 105 bits of entropy. When "No Repeated Characters" is used, the formula adjusts because each position reduces the available characters by one.
What is the minimum password length I should use?
Security experts recommend at least 12-16 characters for most purposes. For high-security accounts (email, banking, password managers), use 16-20 characters or more. Each additional character exponentially increases the number of possible combinations, making brute-force attacks exponentially more difficult.
Should I include symbols in my password?
Yes, including symbols significantly increases the character set size from 62 (letters + numbers) to 95 (all printable ASCII). This increases entropy by about 60% for the same length. However, some websites restrict which symbols are allowed, so you may need to adjust accordingly.
What are ambiguous characters?
Ambiguous characters are those that can be easily confused with each other when displayed in certain fonts or when handwritten. Common examples include lowercase i, uppercase I, lowercase l, the number 1, uppercase L, the pipe character |, lowercase o, uppercase O, and the number 0. Excluding them makes passwords easier to read and type.
What are bracket characters?
Bracket characters include angle brackets < >, parentheses ( ), square brackets [ ], and curly braces . Some users prefer to exclude them because they can be difficult to type on mobile keyboards or may cause issues when passwords are used in URLs or command-line interfaces.
What does "No Repeated Characters" mean?
This option prevents any character from appearing more than once in the generated password. This can make passwords easier to remember and type, and avoids patterns that might weaken security. However, it limits the maximum password length to the size of the character set and slightly reduces total entropy.
Is this password generator secure?
This generator uses JavaScript's Math.random() which is a pseudo-random number generator and is not cryptographically secure. For most purposes, it produces sufficiently random passwords, but for high-security applications (master passwords, encryption keys), consider using a dedicated password manager with a CSPRNG or hardware-based random number generation.
Does this generator store or transmit my passwords?
No. All password generation happens entirely in your browser using client-side JavaScript. Your passwords are never sent to any server, stored in any database, or logged in any way. Once generated, the password exists only in your browser's memory until you navigate away or refresh the page.
What is the difference between a password and a passphrase?
A password is typically a random string of characters, while a passphrase is a sequence of random words (e.g., "correct horse battery staple"). Passphrases can be easier to remember while providing comparable or better entropy. They are often recommended for master passwords to password managers because they are both strong and memorable.
How often should I change my passwords?
Current NIST guidelines recommend changing passwords only when there is evidence of compromise, rather than on a fixed schedule. However, you should immediately change any password if you suspect it has been exposed in a data breach, if you shared it with someone, or if you see unusual activity on the associated account.
What is a brute-force attack?
A brute-force attack is a trial-and-error method used by attackers to crack passwords by systematically trying every possible combination of characters until the correct one is found. The time required depends on the password length and complexity. A 16-character password with full ASCII has 9516 possible combinations, making brute-force infeasible.
What is a dictionary attack?
A dictionary attack tries common words, phrases, and their variations (such as adding numbers or symbols) rather than trying every possible combination. It is far faster than brute-force but ineffective against truly random passwords. This is why password generators create random strings rather than dictionary words.
What is credential stuffing?
Credential stuffing is an attack where hackers use username/password pairs obtained from one data breach to try logging into other websites. It works because many people reuse the same password across multiple sites. Using a unique password for every account, generated by a tool like this one, completely neutralizes credential stuffing attacks.
How do password managers work?
Password managers securely store all your passwords in an encrypted vault protected by a single master password. They can generate strong random passwords, auto-fill login forms, and sync across your devices. Most use AES-256 encryption and never reveal your passwords to the service provider. Popular options include 1Password, Bitwarden, and KeePass.
What is two-factor authentication (2FA)?
Two-factor authentication adds a second layer of security beyond your password. Even if an attacker obtains your password, they would also need the second factor, such as a time-based one-time code from an authenticator app, a hardware security key, or a biometric scan (fingerprint, face ID). Always enable 2FA when available.
Should I use a different password for every account?
Yes, absolutely. Using a unique password for every account ensures that a breach on one site does not compromise your other accounts. With a password manager, you do not need to memorize them all - you only need to remember your master password. This generator helps create those unique passwords instantly.
What is the longest password I can generate?
This tool supports passwords up to 100 characters. While most websites have their own length limits (typically between 32 and 128 characters), a password of 20-30 characters provides more than enough entropy for any application. Longer passwords also offer protection against future advances in computing power.
Can I use this generator for PIN codes?
Yes. To generate a numeric PIN, select only "Include Numbers" and deselect all other character types. Set the length to 4-8 digits for standard PIN requirements. Note that a 4-digit PIN has only 10,000 possible combinations (about 13.3 bits of entropy), so it is not secure for online accounts.
Can I use this generator for API keys?
Yes, this generator can create alphanumeric strings suitable for API keys, tokens, or secret keys. Enable all character types and use a length of 32-64 characters for strong API keys. However, for production security-critical keys, consider using a dedicated cryptographic library or operating system tools.
What is entropy and why does it matter?
Entropy measures the amount of uncertainty or unpredictability in a password, expressed in bits. Each bit of entropy doubles the number of possible passwords an attacker must try. A password with 80 bits of entropy would require up to 280 guesses to crack, which is computationally infeasible for any attacker today.
How many bits of entropy do I need?
For most online accounts, 60-80 bits is considered adequate. For high-value accounts (email, banking, password manager master password), aim for 100+ bits. For context, a 16-character password with all 95 printable characters provides about 105 bits, while an 8-character password with mixed case and numbers provides about 48 bits.
What is password hashing?
Password hashing is a one-way cryptographic function that converts a password into a fixed-length string (a hash). When you log in, the system hashes your input and compares it to the stored hash. Good hashing algorithms (bcrypt, Argon2, PBKDF2) are intentionally slow to make brute-force attacks impractical even if the hash database is stolen.
What is a salt in password hashing?
A salt is a random value added to each password before hashing, ensuring that even if two users have the same password, their hashes will be different. This prevents attackers from using pre-computed rainbow tables to crack hashed passwords. Salts are stored alongside the hash and are not secret - they simply make each hash unique.
How do data breaches expose passwords?
When a website is breached, attackers may steal the user database containing hashed passwords. If the hashing was weak (e.g., unsalted MD5 or SHA1), attackers can crack many passwords quickly. Even with strong hashing, common or weak passwords are still vulnerable. Using unique, high-entropy passwords generated by this tool protects you even if a site you use is breached.
What is a rainbow table attack?
A rainbow table is a pre-computed table of password hashes that attackers use to quickly look up the original password from a hash. Salting completely defeats rainbow table attacks because each password gets a unique random salt, making pre-computation infeasible. Modern systems all use salting, but rainbow tables remain a threat against legacy systems.
How do I check if my password has been compromised?
Use a service like Have I Been Pwned (haveibeenpwned.com) to check if your email address or passwords appear in known data breaches. You can also use their API to check individual passwords without revealing them. If any of your passwords appear in a breach, change them immediately using this generator to create strong replacements.
What is the future of passwords?
The industry is moving toward passwordless authentication using passkeys (WebAuthn/FIDO2), biometrics, hardware security keys, and single sign-on (SSO) protocols. However, passwords will remain important for years to come as a fallback and for legacy systems. In the meantime, using a password generator and password manager is the best way to stay secure.
Are emoji passwords secure?
While emoji passwords can provide high entropy due to the large character set (over 3,600 available emoji), many systems do not support them or handle them inconsistently. Emoji can also be difficult to enter on different devices and keyboards. For maximum compatibility, stick with standard printable ASCII characters.
How do I securely share a password with someone?
Never share passwords through unencrypted channels like email, text messages, or instant messaging. Use a password manager's secure sharing feature (most premium managers support this), or use an encrypted messaging app with disappearing messages. After sharing, the recipient should change the password and the sender should revoke access.
What should I do if I forget a generated password?
Since generated passwords are random strings, they are nearly impossible to remember. Always save passwords in a password manager immediately after generation. If you forget a password and do not have it saved, use the "Forgot Password" feature on the website to reset it, then generate a new password and save it in your manager.