Home › Password and Token Generator
Password and Token Generator
Create random strings of any length from a character set you choose, one or many at once, and see how many bits of entropy each one carries.
Results
How it works
Characters are picked using the browser’s cryptographically secure random generator. To keep every character equally likely, values that would cause a bias are discarded and drawn again, instead of using a simple remainder. The entropy is the length multiplied by the base-2 logarithm of the number of possible characters.
Rules and details
Entropy (bits) = length × log₂(number of possible characters)Hex: 16 characters = 4 bits each · Letters and digits: 62 = 5.95 bits eachCustom set: duplicate characters are counted onceRandomness: crypto.getRandomValues with rejection sampling
Worked example
A hexadecimal token has 16 possible characters, so 32 characters carry 128 bits of entropy, the size of a 128-bit key. With letters and digits (62 characters), 20 characters already give 119 bits.
Frequently asked questions
How long should a password be?
Length matters more than complexity. Around 70 bits of entropy resists offline guessing for most uses; 128 bits is a common target for keys and tokens.
Where is the generated password stored?
Nowhere. It exists only in the page until you close or refresh it. Copy it straight into your password manager.
Why remove look-alike characters?
Characters like I, l, 1, O, 0 and o are easy to confuse when you must read a password aloud or type it from paper. Removing them slightly reduces entropy per character.
Tips
- Use a password manager so you never need to memorize the result.
- For API keys use the Base64URL or hex set, which are safe in URLs and headers.
- A digits-only PIN has little entropy: prefer a lockout on the system that checks it.