How strong is a password? Length, randomness and entropy in plain words
What password entropy measures, how length and character set combine, why invented passwords are weaker than they look, and what the password tools show.
A password is as strong as the number of equally likely passwords its method could have produced. Entropy states that number in bits, and every extra bit doubles the guesses an attacker would need. Length adds the most bits, but only when each character is picked at random. A password a person makes up has much less entropy than its length suggests.
Entropy measures the method, not the string
Anyone attacking your password is assumed to know how it was made: the character set, the length, even the program. What they cannot know is the random choices. Entropy counts those choices. If a method can produce N to the power L different passwords, each as likely as any other, its entropy is L × log₂(N) bits.
Take a 4-digit PIN. There are 10 × 10 × 10 × 10 = 10,000 possibilities, about 13.3 bits, because 2 to the power 13.3 is roughly 10,000. Eight random lowercase letters give 26 to the power 8, about 209 billion passwords, or 37.6 bits. Two strings of eight letters can still differ completely in strength. Letters drawn by a generator are worth the full 37.6 bits, while eight letters that spell a word are worth only as much as one guess from a dictionary.
Entropy describes the process that made a password. The formula L × log₂(N) holds only when every character is chosen independently and uniformly at random, as a good generator does.
How alphabet size and length combine
Each random character adds log₂(N) bits, where N is the number of characters it could have been. A digit adds 3.32 bits, a lowercase letter 4.70, and a character from the 94 printable ASCII symbols (letters, digits and punctuation, without the space) 6.55.
| Characters to choose from | Bits each | 12 characters | 20 characters |
|---|---|---|---|
| Digits (10) | 3.32 | 39.9 | 66.4 |
| Lowercase letters (26) | 4.70 | 56.4 | 94.0 |
| Upper and lowercase (52) | 5.70 | 68.4 | 114.0 |
| Letters and digits (62) | 5.95 | 71.5 | 119.1 |
| StillKit's password generator, as it opens (73) | 6.19 | 74.3 | 123.8 |
| Printable ASCII (94) | 6.55 | 78.7 | 131.1 |
Doubling the alphabet adds 1 bit per character, while one more character adds a whole log₂(N). Twelve random lowercase letters give 56.4 bits. Mixing in capitals raises that to 68.4 bits; adding 3 more lowercase letters instead raises it to 70.5. Where a site accepts long passwords, length is the cheaper gain, and it is easier to type on a phone than a mix of symbols.
The random password entropy calculator does this arithmetic. Enter the Alphabet size and the number of Independent random characters; its example, 64 and 24, gives 144 bits. Its note states the limit plainly: the formula "does not apply to human-chosen passwords or biased generators".
A password you invent is weaker than it looks
People do not choose characters independently. They start from a word or a name, put a capital at the front, and add a year and a symbol at the end. Guessing programs try those habits first, along with lists of passwords leaked in earlier breaches. Rules that demand one capital, one digit and one symbol push people into exactly these patterns. NIST's digital identity guidelines (SP 800-63B) advise websites to compare new passwords against lists of compromised ones and not to impose composition rules.
Take Summer2024! as an example. Treated as 11 random characters from the 94 printable ones, it would be worth about 72 bits. Its real strength is closer to the size of the list an attacker builds from season names, years and common symbols, which is small. The password composition checker reports 11 characters, 9 of them unique, with uppercase, lowercase, a number and a symbol, and no run of three identical characters. Every box is ticked, yet the password is weak. That is why the checker gives no score and warns that "Composition does not establish strength."
The checker also counts UTF-8 bytes, because some systems limit passwords by bytes rather than characters. The word café is 4 characters but 5 bytes, since é takes two. Some password-storage schemes, bcrypt among them, read only the first 72 bytes.
Random passwords and random passphrases
A passphrase is a series of words picked at random from a fixed list. The attacker is assumed to have the list, so each word adds log₂ of the list's size. A list of 7,776 words, the number of different results five six-sided dice can show, gives 12.9 bits per word. Six such words give 77.5 bits, a little more than 12 characters from the 73 that StillKit's password generator opens with (74.3 bits).
The words must come from dice or a generator, not from you. A line from a song or a favorite quote has very little entropy, however long it is. To check a passphrase method, enter the list size as the Alphabet size and the number of words as the Independent random characters; the arithmetic is the same. StillKit's generators produce random characters, not words.
Which to choose depends on where the password goes. A passphrase is easier to remember and to type on a phone. A random-character password is shorter, fits sites with low length limits, and suits anything kept in a password manager, where you seldom type it.
The random source and the device both matter
Entropy assumes a source no one can predict. General-purpose random functions in programming languages, such as JavaScript's Math.random, are made for games and simulations and are not designed to be unpredictable. StillKit's generators read from the browser's cryptographic random number generator, crypto.getRandomValues, part of the Web Crypto standard.
Turning random bytes into characters needs care too. A byte has 256 possible values, and 256 is not a multiple of 73, the number of characters the password generator opens with. Mapping every byte by its remainder would make 37 of the characters come up 4 times in 256 and the other 36 only 3 times. StillKit discards any byte of 219 or more (219 is 3 × 73) and maps the rest, so each character has exactly 3 chances in 219. It does the same sum for whatever set of characters you allow. That is what "unbiased" means on the generator's page.
Where the generator runs matters as much. A password made on a web server exists on that server, at least for a moment, and could end up in its logs. A password made in your browser exists only in your tab until you copy it, and StillKit stores none of the values it generates. Copy it straight into your password manager or the sign-up form, then close the page.
What StillKit's password tools tell you, and what they cannot
- The custom password generator takes Allowed characters, a Password length (12–256) and a Number of passwords (1–50). It opens with 73 characters, which at its example length of 24 is about 148.6 bits. It uses the characters you leave in the box, from 2 to 256 different ones, which helps when a site forbids some symbols, or when you remove I, O, l, 0 and 1 because they are easy to misread. A character typed twice counts once, so it does not become more likely. Recalculate the entropy with your new alphabet size, because removing symbols from the default 73 characters lowers the bits per character.
- The secure random token generator is for secrets nobody types, such as API keys. It gives 16 to 128 random bytes as Hex or Base64url. The default 32 bytes is 256 bits, shown as 64 hex digits or 43 Base64url characters.
- The entropy calculator and composition checker analyze but do not judge. Neither looks up breach lists, and neither predicts crack time, which depends on how a site stores passwords and on the attacker's equipment.