It looks like your browser language isn't English. Would you like to switch to the Traditional Chinese version? 切換到繁體中文 ×

Password Generator

security Security & Privacy Guarantee

This tool runs 100% locally in your browser, using the cryptographically secure random number generator built into your browser. Passwords are never sent to a server or stored.

How it works

A strong password is one that cannot be guessed, and that comes down to randomness. This tool draws every character from crypto.getRandomValues(), the browser's cryptographically secure random source. It does not use Math.random(), which is built for speed and is not designed to be unpredictable.

Picking a character from a list has a subtle trap. Taking a random number and using the remainder after dividing by the list length makes some characters slightly more likely than others, which is known as modulo bias. This tool avoids it by discarding random values that fall outside the largest even multiple of the list length and drawing again, so every character is equally likely.

When you tick several character types, the password must contain at least one of each, because many sign-up forms require that. Rather than swapping characters in afterwards, which would make the result less uniform, the tool throws away any password that misses a type and generates a new one.

The entropy shown under the result estimates strength: length multiplied by log2 of the number of possible characters. A 20-character password using all four types draws from 85 characters, which gives about 128 bits. Length adds more than extra symbols do, so if a system allows it, a longer password is the simplest way to make it stronger.

To use the tool, set the length and character types, then press Generate. Nothing is kept once you leave the page, and there is no history, so copy the password into your password manager straight away. Some systems limit the length or reject certain symbols. If yours does, turn off symbols and make the password longer instead. A password is only as safe as the place you keep it, so avoid sending it through chat or email, and use a different one for each account.

Removes I, l, 1, O, 0 and o, which are easy to mix up when read by eye.

Result

Waiting for input...


Use cases

FAQ

Q: Are the generated passwords uploaded or saved?

A: No. They are generated by JavaScript in your browser and exist only on this page. Nothing is sent to a server, and they are gone when you close or reload the page.

Q: How long should a password be?

A: Use 16 characters or more for ordinary accounts, and 24 or more for server, database and admin accounts. If you use a password manager, there is little reason to keep it short.

Q: Why not just use Math.random()?

A: Math.random() is not designed to be unpredictable, and its output can be predicted in some situations. crypto.getRandomValues() is meant for security use, so it is the right source for passwords.

Q: What does excluding look-alike characters do?

A: It removes I, l, 1, O, 0 and o, which are easy to confuse when reading. The character pool becomes slightly smaller, so the entropy goes down a little. Add a character or two if that matters.

Q: What does the entropy number mean?

A: It estimates how many guesses an attacker would need, as a power of two. It is calculated as length times log2 of the pool size, and slightly overstates the figure when every type is required, so treat it as a rough guide.

Done