Password Generator, Strong Random Passwords & Entropy

Generate strong random passwords with a choice of character sets. The Password Generator shows the entropy in bits and runs entirely in your browser.

All calculation runs in your browser. Nothing you enter is sent to a server.

01 calculator

Result

    Mode
    Mode
    Character sets
    Modifiers

    The Password Generator produces random passwords from the character sets you choose and reports the strength of each one in bits of entropy rather than a vague label. Length runs from 4 to 128 characters, with optional exclusions for ambiguous characters and brackets, and a passphrase mode that builds memorable multi-word passwords instead.

    Every password is generated in your browser using the operating system's cryptographic random number generator. Nothing is transmitted, logged or stored.

    Generate a random password

    Concept diagram: Inputs leads to Generate a random password leads to ResultInputsGenerate a randompasswordResult
    Generate a random password.

    Set a length, choose which character sets to draw from, and the generator returns a password immediately. Regenerate as many times as you like, each press produces a fresh draw from the same pool, and none of them is recorded anywhere.

    Sixteen characters drawn from all four sets is a reasonable default for anything protecting money or identity. Twelve is adequate where a service rate-limits login attempts. Below twelve, a password is only as safe as the site's own defences, and those are not something you can verify.

    Length matters more than complexity. Adding one character to a 94-character pool multiplies the search space by 94. Swapping a lowercase letter for a symbol in a fixed-length password does far less. If a site caps password length at 16, use all 16.

    Choose which character sets to include

    Concept diagram: Inputs leads to which character sets to include leads to ResultInputswhich character sets toincludeResult
    Choose which character sets to include.

    Four sets are available, and each one you enable widens the pool every character is drawn from.

    SetCharactersCount
    Lowercasea-z26
    UppercaseA-Z26
    Digits0-910
    Symbols`!"#$%&'()*+,-./:;<=>?@[\]^_{\}~``32

    All four together give a 94-character pool. Three modifiers narrow it:

    Exclude ambiguous characters removes i I l 1 L |, o O 0, and the quote and punctuation lookalikes. Worth using for a password you will read off a screen and type on another device, or dictate over a phone. It costs a small amount of entropy and saves real frustration.

    Exclude brackets removes < > ( ) [ ] { }. Some legacy systems mishandle them in login forms, and a few shell environments treat them specially when a password is used in a script.

    No repeated characters guarantees every character appears once. This sounds stronger and is slightly weaker: it shrinks the pool with each character placed, and it caps the password length at the pool size. Use it only when a policy demands it.

    There is also a choice between drawing every character from the combined pool, or guaranteeing at least one character from each selected set. The second option exists because many corporate password policies require it. Note that forcing one of each very slightly reduces entropy, because it removes some valid combinations from the possible outputs.

    Measure password strength in bits of entropy

    Concept diagram: Inputs leads to Measure password strength in bits… leads to ResultInputsMeasure passwordstrength in bits…Result
    Measure password strength in bits of entropy.

    Entropy measures how many guesses an attacker needs, expressed as a power of two. It is the only meaningful way to compare passwords, because a strength meter that says "strong" tells you nothing about what it is strong against.

    Entropy (bits) = length × log₂(pool size)
    Combinations   = pool size ^ length

    Bits are additive and each one doubles the work. A 60-bit password takes twice as long to crack as a 59-bit one, and 1,024 times as long as a 50-bit one. That is why small increases in length produce large increases in safety.

    Rough thresholds, and the reason each matters:

    • Under 40 bits: breakable in minutes by anyone with a consumer GPU. Adequate for nothing that matters.
    • 50 to 60 bits: resists casual attack, falls to a determined offline attack. Fine for a forum login.
    • 70 to 80 bits: safe against realistic offline attacks today. A sensible target for most accounts.
    • Over 100 bits: beyond what any foreseeable hardware brute-forces. Appropriate for password manager master passwords and encryption keys.

    Calculate the entropy of a 16-character password

    Concept diagram: Inputs leads to entropy of a 16-character password leads to ResultInputsentropy of a16-character passwordResult
    Calculate the entropy of a 16-character password.

    A 16-character password drawn from all four sets carries about 105 bits of entropy. Here is the arithmetic. 1. Add up the pool. 26 lowercase + 26 uppercase + 10 digits + 32 symbols = 94 characters 2. Find the bits per character. log₂(94) = 6.55 bits

    3. Multiply by the length. 16 × 6.55 = 104.9 bits

    4. Express it as a count. 94¹⁶ ≈ 3.7 × 10³¹ possible passwords

    Shorten that to 12 characters and the entropy drops to 78.6 bits, with 4.7 × 10²³ combinations. Still strong, and roughly 68 billion times easier to attack than the 16-character version. Drop the symbol set from the 16-character password and the pool falls to 62, giving 95.3 bits, a smaller loss than shortening by four characters.

    That comparison is worth sitting with. Removing four characters costs more than removing an entire character set. Length is the lever.

    Understand how long a password takes to crack

    Process with 3 steps: Enter how long a password takes…; Read the main result; Check the breakdown1Enter how long apassword takes…2Read the main result3Check the breakdown
    Understand how long a password takes to crack.

    Any single "time to crack" figure is meaningless without stating the attack. The same password falls in seconds or outlasts the sun depending entirely on how the attacker is guessing, so the generator reports two scenarios and names both.

    Expected guesses = 2^(entropy − 1)
    Time             = expected guesses / guesses per second

    Online attack, roughly 10³ guesses per second. The attacker is submitting guesses to a live login form. Rate limiting, lockouts and network latency cap the speed. Most real attacks against a single account look like this, and almost any generated password survives it indefinitely.

    Offline attack, roughly 10¹² guesses per second. The service has been breached and the attacker holds the password hashes. With a GPU cluster and a fast hash like unsalted MD5 or SHA-1, guessing runs at a trillion per second or more. This is the scenario that matters, because it is the one you cannot influence.

    At 10¹² guesses per second, a 78-bit password takes about 4,800 years and a 105-bit password takes longer than the age of the universe by many orders of magnitude. A 40-bit password takes under a second.

    One caveat the numbers hide: these figures assume the attacker is guessing blindly. A password built from words, dates or keyboard patterns falls far faster than its character count suggests, because attackers guess likely candidates first. That is why the passwords here are drawn randomly rather than assembled from anything memorable.

    Use a passphrase instead of a random string

    Concept diagram: Inputs leads to a passphrase instead of a random… leads to ResultInputsa passphrase instead ofa random…Result
    Use a passphrase instead of a random string.

    A passphrase is several random words joined together. It reaches similar entropy to a random string while staying possible to remember and to type, which is why it suits the handful of passwords you cannot store in a manager.

    Entropy = number of words × log₂(word list size)

    With a 7,776-word list, each word contributes log₂(7776) = 12.9 bits.

    WordsEntropyComparable to
    451.7 bitsAn 8-character random password
    564.6 bitsA 10-character random password
    677.5 bitsA 12-character random password
    790.4 bitsA 14-character random password

    Six words gives 77.5 bits, solid against offline attack, and something most people can memorise in a few repetitions. Compare typing correct-horse-battery-staple-mountain-glass against K7#mQ2vX@pL9. Both are strong; only one can be recalled and typed on a television remote.

    Two rules make a passphrase safe. The words must be chosen randomly by a machine, not by you, human word choice clusters heavily around common vocabulary and thematic association. And they must not form a phrase that exists anywhere, because a quoted line of song lyric has almost no entropy no matter how many words it contains.

    Use a passphrase for your password manager's master password, your device login and your email account. Use random strings, stored in the manager, for everything else.

    Understand why this generator uses crypto.getRandomValues

    Concept diagram: Inputs leads to why this generator uses… leads to ResultInputswhy this generatoruses…Result
    Understand why this generator uses crypto.getRandomValues.

    The Password Generator draws every character from crypto.getRandomValues(), the browser's cryptographic random number generator, which is seeded by the operating system's entropy pool. It does not use Math.random(), and that distinction is the difference between a password and the appearance of one.

    Math.random() is a fast pseudorandom generator built for simulations and games. Its internal state is small, browsers document it as unsuitable for security, and its output is predictable to anyone who observes enough of it or who knows the implementation and roughly when a value was generated. A password generator built on Math.random() produces passwords that can be reconstructed rather than guessed, and the character count offers no protection at all against that.

    There is a second, subtler requirement. Mapping random bytes onto a character set with a plain remainder operation introduces bias: 2³² does not divide evenly by 94, so the earliest characters in the set come up slightly more often than the rest. The skew is invisible in any individual password and measurable across enough of them, and it lowers the real entropy below the calculated figure. This generator uses rejection sampling, a value falling in the uneven tail is discarded and redrawn, so the distribution is genuinely uniform.

    No seed is shown for passwords, and this is deliberate. Other randomisers on this site display their seed so a result can be reproduced and verified. A reproducible password is a compromised password, so no seed is stored, displayed or derivable here.

    Everything happens in your browser. No password is sent to a server, written to storage, or included in any analytics event.

    Store passwords safely

    Concept diagram: Inputs leads to Store passwords safely leads to ResultInputsStore passwords safelyResult
    Store passwords safely.

    A generated password only helps if it is used once and stored somewhere you can retrieve it. Reuse is the failure that undoes everything else: when one service is breached, attackers try the recovered credentials everywhere, and a 105-bit password reused across ten sites protects none of them after the weakest one falls.

    Four practices, in order of how much they matter:

    Use a password manager. It removes the need to remember or retype anything, which removes the incentive to reuse or simplify. Protect it with a long passphrase, and keep an offline record of that passphrase and the recovery key somewhere physically secure.

    Turn on two-factor authentication wherever it is offered, and prefer an authenticator app or a hardware key over SMS. SMS codes can be intercepted through SIM swapping. A second factor keeps an account safe even when the password is known.

    Change a password when there is a reason to. Scheduled rotation every ninety days is no longer recommended by NIST, because it pushes people toward predictable variations. Change immediately on any sign of a breach, on any suspicion, and on any password you know you reused.

    Check your addresses against known breaches. Services that let you search your email address against public breach data will tell you which accounts need attention now, which is more useful than changing everything on a schedule.

    Frequently asked questions

    How long should a password be?

    Sixteen characters is a good default for accounts protecting money, identity or communications, giving about 105 bits of entropy from a full character set. Twelve characters, at roughly 79 bits, is adequate for lower-value accounts. Where a site allows more, use more, each additional character multiplies the search space by the size of the pool.

    What makes a password strong?

    Randomness and length, in that order. A strong password is drawn unpredictably from a large character pool and is long enough that the total number of possibilities is impractical to search. Substitutions like p@ssw0rd add almost nothing, because attackers guess those patterns first. Entropy in bits measures actual strength; a "strong" label does not.

    Are the passwords generated here safe to use?

    Yes. Every password is generated in your browser by crypto.getRandomValues(), the operating system's cryptographic random number generator, using rejection sampling so the character distribution is uniform. No password is transmitted, logged or stored, and no third-party script with access to the page runs here.

    Is my password sent anywhere?

    No. Generation happens entirely in your browser and no generated value leaves it. Nothing is written to browser storage, included in a share link, or carried in an analytics event. Closing the tab discards the password permanently, so copy it into your password manager before you leave.

    What does entropy mean in bits?

    Entropy in bits expresses how many guesses an attacker needs, as a power of two. A 60-bit password requires about 2⁵⁹ expected guesses. Each additional bit doubles the difficulty, which is why the figure grows quickly with length: 16 characters from a 94-character pool gives 104.9 bits, or roughly 3.7 × 10³¹ possibilities.

    Should I include symbols in my password?

    Include them where the site accepts them, but do not choose symbols over length. Adding the 32-character symbol set to a 16-character password raises entropy from 95.3 to 104.9 bits. Adding four more characters to a symbol-free password raises it from 95.3 to 119.1. Length is the stronger lever.

    What is a passphrase and is it as strong as a random password?

    A passphrase is several randomly chosen words joined together. Six words from a 7,776-word list gives 77.5 bits, comparable to a 12-character random password, and it is far easier to remember and type. It must be machine-chosen and must not form an existing phrase, since a recognisable quotation carries almost no entropy.

    Can I reuse a strong password across accounts?

    No. Reuse is the single most damaging password habit, and password strength does not protect against it. When any one service is breached, attackers try the recovered credentials across every major site. Each account needs its own unique password, which is the problem a password manager exists to solve.

    How often should I change my password?

    Change it when there is a reason: a known or suspected breach, a shared or reused password, or a device you no longer control. NIST withdrew its scheduled-rotation guidance because forced regular changes push people toward predictable variations like appending a number, which weakens security rather than improving it.

    What is modulo bias and why does it matter?

    Modulo bias is the skew introduced when random bytes are mapped onto a character set using a plain remainder, because the byte range rarely divides evenly by the set size. Some characters then appear slightly more often, lowering real entropy below the calculated figure. This generator discards and redraws values in the uneven tail so the distribution is genuinely uniform.

    Summary

    The Password Generator draws passwords from a pool of up to 94 characters using the browser's cryptographic random number generator, with rejection sampling to keep the character distribution uniform, and reports strength as entropy in bits rather than as a label.

    Length is the strongest factor: a 16-character password from the full set carries about 105 bits, and shortening it by four characters costs more entropy than removing the entire symbol set. Crack-time figures are given for both an online attack at 10³ guesses per second and an offline attack at 10¹², because a single unqualified figure means nothing. Passphrase mode reaches comparable strength while staying memorable, which suits the few passwords that cannot live in a manager. Every password is generated locally and none is transmitted, logged or stored.