How to Create Strong Passwords: Complete Security Guide

Codezyra Team•March 25, 2026•6 min read
securitypasswordgeneratortips

Related Tool

Password Generator

Try It Free

In 2026, a password should be at least 15 characters long if it is the only thing protecting an account, and it should be random and unique to that account. That is the minimum set by the US National Institute of Standards and Technology in NIST SP 800-63B, the guideline most security policies are based on. For accounts that matter, such as email, banking and your password manager, a randomly generated password of 16 to 20 characters or a passphrase of six random words, combined with two-factor authentication, is a comfortable margin.

The Password Generator creates passwords from 4 to 64 characters using your browser's cryptographically secure random number generator, with toggles for upper case, lower case, numbers and symbols and an option to exclude look-alike characters. This guide explains the reasoning behind those choices.

What NIST SP 800-63B Says About Passwords

NIST revised its digital identity guidelines as SP 800-63-4, and the password section (SP 800-63B) reverses several rules many people still follow. The key requirements for services that check passwords are:

  • Passwords used as the only authentication factor must be at least 15 characters. Passwords used as part of multi-factor authentication can be shorter, but must be at least 8 characters.
  • Services should allow passwords of at least 64 characters, so long passphrases are not cut off.
  • Services must not impose composition rules, such as requiring a mix of upper case, numbers and symbols.
  • Services must not force periodic password changes. They must force a change when there is evidence the password has been compromised.
  • New passwords must be checked against a blocklist of commonly used, expected or compromised passwords.
  • Password managers and autofill must be allowed, and pasting passwords should be permitted.
  • Password hints and security questions such as "your first pet's name" must not be used.
  • The reasoning is practical. Composition rules push people towards predictable patterns like Password1!, and forced expiry leads to Summer2025 becoming Autumn2025. Length and randomness are what actually make a password hard to guess, while blocklists catch the passwords attackers try first.

    Why Length Beats Complexity

    Password strength is often measured in bits of entropy: the number of guesses an attacker would need is about 2 raised to that number. For a truly random password, entropy is the length multiplied by log₂ of the number of possible characters.

    Password type
    Characters to choose from
    Approximate entropy
    12 random characters, all types
    88
    78 bits
    15 random lower-case letters
    26
    71 bits
    16 random letters and digits
    62
    95 bits
    16 random characters, all types
    88
    103 bits
    20 random characters, all types
    88
    129 bits
    6 random words from a 7,776-word list
    7,776
    78 bits

    The 88-character set is what the Password Generator uses with every option on: 26 lower-case letters, 26 upper-case letters, 10 digits and 26 symbols. Two things stand out. Adding length raises entropy faster than adding character types, and 16 random letters and digits already beat 12 characters with symbols. And every additional bit doubles the work for an attacker, so the 103-bit password is not slightly harder to guess than the 78-bit one; it takes tens of millions of times more guesses.

    These figures only apply to passwords that are genuinely random. A 16-character password built from a name, a year and a symbol has far less entropy than its length suggests, because attackers try those patterns first.

    Random Passwords vs Passphrases

    Both are good choices, for different situations.

    Random character strings such as k7#Qm2vX!9pLr4Tz pack the most strength into the fewest characters and are ideal for anything stored in a password manager, where you never type them yourself.

    Passphrases such as six randomly chosen words are easier to remember and to type on a phone or TV. The words must be chosen randomly, for example with dice and a published list like the EFF large wordlist, which has 7,776 words. A phrase you invent yourself, or a famous quote, is far weaker because people pick predictable words.

    A good rule: use a passphrase for the few passwords you must remember (your password manager's master password, your computer login) and random generated passwords for everything else.

    Common Password Mistakes

  • Reusing a password. When one site is breached, attackers try the same email and password everywhere else. This is called credential stuffing, and a unique password per site defeats it completely.
  • Using personal information. Names, birthdays, pets and sports teams are easy to find on social media.
  • Predictable substitutions. Swapping a for @ or o for 0 is built into every cracking tool.
  • Short passwords with "complexity". Eight characters with a symbol is below today's minimum for a single-factor password.
  • Changing a password by one character. Password3 after Password2 offers no protection once the old one has leaked.
  • How to Manage Strong Passwords

    Nobody can remember dozens of random passwords, and NIST's guidance assumes you will not try to.

  • Use a password manager. It generates, stores and fills unique passwords, and its autofill also helps protect you from phishing sites because it will not fill a password on the wrong domain.
  • Protect the password manager with a long passphrase and two-factor authentication.
  • Turn on two-factor authentication everywhere it is offered, especially email, which is used to reset every other account. An authenticator app or hardware security key is stronger than SMS codes.
  • Use passkeys where available. Passkeys replace the password with a cryptographic key stored on your device and cannot be phished or reused.
  • Change a password when there is a reason: a breach notification, suspicious activity, or a password you have reused elsewhere.
  • How the Codezyra Password Generator Works

  • Randomness comes from crypto.getRandomValues, the browser's cryptographically secure random number generator, not from Math.random.
  • You choose the length (4 to 64 characters, 16 by default) and which character sets to include.
  • The exclude-ambiguous option removes characters that are easy to confuse, namely i, l, 1, L, o, 0 and O, which helps when a password has to be read aloud or typed from a screen. It removes 7 characters from the pool, so add a character or two of length to compensate.
  • The strength meter is a simple guide based on length and the character types present; for generated passwords, length is the setting that matters most.
  • Passwords are generated in your browser and never sent to a server. The last five appear in a Recent Passwords list on the page until you leave it.
  • For a site that limits you to letters and digits, simply turn symbols off and increase the length. Pair the generator with the Hash Generator if you are a developer testing how passwords are stored, and remember that real applications should hash passwords with a dedicated slow algorithm such as Argon2, bcrypt or scrypt rather than a plain SHA hash.

    Ready to replace a weak password? Open the Password Generator, set the length to at least 16, and save the result straight into your password manager.

    Ready to try Password Generator?

    Free secure password generator to create strong random passwords with uppercase, lowercase, numbers, and symbols.

    Use Password Generator