PlayTools

What actually makes a password strong

自定义长度和字符集,生成包含大写、小写、数字和符号的强随机密码。

Runs in your browser — nothing you enter is uploaded
TATVOLYv5Nett5Ka
Password strengthStrong · about 95 bits

What actually makes a password strong

A password is strong when it is hard to guess, and "hard to guess" has a precise meaning: the number of possibilities an attacker would have to try. That number depends on two things — how many characters the password has, and how many options each character is drawn from. This generator uses the browser's cryptographically secure random source (crypto.getRandomValues), so every character is genuinely unpredictable, not the output of a weak Math.random.

Length matters far more than symbols. Adding one random lowercase letter multiplies the search space by 26; switching a 10-character password to 16 characters multiplies it by 26^6 — over 300 million times. This is why a long passphrase of ordinary words can be stronger than a short string of "@$!" gibberish, and much easier to type. Complexity rules exist mainly to stop people choosing "password1"; past a reasonable minimum they add little.

The threat model is offline cracking. If a service is breached and its password hashes leak, attackers run billions of guesses per second against them using wordlists, previously-leaked passwords, and predictable substitutions (a→@, o→0). A password built from real random characters has no pattern to exploit, so the only attack left is brute force — which a sufficiently long one makes infeasible.

熵与长度:每位额外比特让搜索空间翻倍。面对字典攻击时,“更长”往往优于“更花哨”。人机记忆可用长口令句;机器存储可用高质量随机串。

建议:配合密码管理器;发生泄露及时更换;不要在低信誉站点复用银行密码;避免把导出截图同步到公开相册。

与 UUID 区别:UUID 标识对象;密码证明身份,二者不可替代。

How passwords are generated and rated

Each character is drawn from your browser’s cryptographically secure generator, with rejection sampling so every character in the set is exactly equally likely. Every character type you tick is guaranteed to appear at least once — so the password passes sites that insist on a digit or a symbol — and the positions are then shuffled. The password is created on your device and never sent anywhere.

The strength meter measures how many passwords the generator could have produced: length × log2(number of possible characters), in bits. Under 50 bits is rated weak, 50–69 fair, 70–99 strong and 100 or more very strong. Each extra bit doubles the work for an attacker.

Worked examples

Length  Character set                 Entropy   Rating
8       letters + digits (62)          48 bits  Weak
16      letters + digits (62)          95 bits  Strong
12      all four sets (88)             78 bits  Strong
20      all four sets (88)            129 bits  Very strong
64      lowercase only (26)           301 bits  Very strong

Length does more than variety: a 16-character letters-and-digits password is stronger than a 12-character one with symbols. Add symbols when a site caps the length, or when it requires them.

Passphrases for the passwords you must remember

For the few passwords you type from memory — your password manager’s master password, your computer login — a passphrase of random words is easier to remember at the same strength. With a 7,776-word list (the EFF dice list), each word adds about 12.9 bits: four words give about 52 bits, six words about 78. The words must be chosen randomly, not picked by you; a favourite quote or song lyric is easy to guess no matter how long it is.

Using generated passwords well

  • Use a different password for every account, stored in a password manager. Reuse, not weakness, is how most accounts are taken over after another site is breached.
  • Turn on two-factor authentication or passkeys where offered; they protect you even if a password leaks.
  • Change a password when a service reports a breach, not on a fixed schedule.

In-depth guides

These free tools pair well with this page — open them in a new tab to finish your workflow.

常见问题

生成的密码安全吗?

密码使用浏览器内置的密码安全随机数生成器(window.crypto.getRandomValues)生成。它们永远不会离开您的浏览器——没有密码会被发送到任何服务器。一个使用所有字符类型的16位密码有超过95^16种可能的组合。

什么使密码变得强大?

对随机生成的密码而言,强度就是可能组合的数量:长度 × log2(字符集大小),以比特计。长度比字符种类更重要——20 位随机小写字母(约 94 比特)强于 12 位包含大小写、数字和符号的随机密码(约 78 比特)。当网站限制长度时,增加字符种类最有帮助。避免规律、字典词和个人信息,它们会让密码远弱于其长度所显示的强度。

什么是密码短语,它比随机密码更好吗?

密码短语是一系列随机词语(如"correct horse battery staple")。长密码短语既安全又比随机字符串更容易记忆。从7,776个词汇库(骰子密码)中选出的4个词组合约有51位熵,与10位随机密码相当。

我应该使用密码管理器吗?

应该。密码管理器为每个网站生成和存储独特的复杂密码,您只需记住一个主密码。流行选项包括Bitwarden(免费开源)、1Password和Dashlane。在多个网站使用相同密码是重大安全风险。

为什么应该避免在密码中使用个人信息?

攻击者使用社会工程学和数据泄露信息来猜测密码。如果您的密码包含名字、生日、宠物名字或喜欢的球队,即使密码看起来很复杂,也可能通过定向攻击被猜出。应始终使用随机生成的密码。