「弱密码」很少输在字符太简单上,更多是输在复用和可猜测:一个密码走天下,泄露一处全站沦陷。本文讲清强密码的三要素、熵到底怎么算、密码管理器怎么配合、易混淆字符什么时候要排除,以及为什么个人信息是密码最差的原料。
强密码三要素
一个密码够不够强,只看三件事:
- 长度:这是最有效的强度来源。每多一位,穷举成本就乘以字符集的大小(字母数字集是 ×62);
- 随机性:每一位都不能有规律。人「随手打」的密码几乎必然带规律——常用词、键盘走位、可预测的替换(a→@);
- 不复用:强度再高的密码,复用到十个站点后,安全水平等于最弱的那个站点。数据库泄露防不住,复用才是灾难放大的根源。
三条合起来的实践标准:每个账号一条独立生成的随机密码,16 位起步。靠脑子记住几十条这样的密码不现实,所以第三条要素其实指向后面讲的管理器方案。
熵:衡量强度的尺子
「强」是个模糊的词,密码学里用熵来量化:单位是比特,含义是「随机猜中这个密码平均需要多少次二选一」。它只由两件事决定——字符集大小 × 密码长度,前提是每一位真的随机。
每个字符贡献的熵约等于 log2(字符集大小):
| 字符集 | 大小 | 每位熵 | 16 位总熵 |
| 纯小写字母 | 26 | ≈ 4.7 比特 | ≈ 75 比特 |
| 大小写 + 数字 | 62 | ≈ 5.95 比特 | ≈ 95 比特 |
| 含全部可打印符号 | 95 | ≈ 6.5 比特 | ≈ 104 比特 |
参考基准:80 比特以上对抗离线穷举比较从容,100 比特以上在可预见的算力下接近「猜不动」。反过来,一个由常见单词加年份构成的密码,人选拼凑的实际熵往往不到 20 比特——哪怕它有 12 位长、还带感叹号。这也是「P@ssw0rd2024」毫无强度的原因:字符集看着花哨,但每个选择都是人做的,不随机。
所以正确的思路不是「往里塞符号」,而是让机器替你随机。用密码生成器生成 16–32 位的随机串,长度和字符集一目了然,熵直接算得出来。
密码管理器怎么配合
管理器解决的是「生成之后怎么用」的问题,分工非常清晰:
- 管理器保管:几十上百条随机密码由管理器加密存储,自动填充登录,你只需要记一条主密码;
- 生成器造料:新注册账号时用随机密码生成器现生成一条,长度拉到 16 位以上、全字符集、每条独立,生成后立即存入管理器;
- 主密码单独强化:主密码是唯一的单点,要更长(20 位左右的随机串或四五个不相关的随机单词),并开启两步验证;
- 关键账号留后手:邮箱是所有「忘记密码」的重置入口,它的密码加两步验证优先级最高。
选管理器时看三点:零知识加密(服务商无法解密你的库)、开源或有安全审计记录、支持自动填充和跨设备同步。浏览器自带的「记住密码」可以当临时方案,但没有独立的生成和加密强度保证。
易混淆字符说明
很多生成器提供一个「排除易混淆字符」选项,去掉 l / 1 / I、O / 0 这类长得很像的字符。用不用取决于使用场景:
- 复制粘贴场景:不用排除。网页登录、App 登录都是粘贴或自动填充,字符再像也不会认错,保留完整字符集反而熵更高;
- 人工抄写场景:建议排除。WiFi 密码要念给客人、打印在会议室墙上的密码、手写在笔记本上的初始密码——这些场景里
l1I0O 是灾难,勾选排除更实用;顺带一提,把 WiFi 密码做成二维码让客人扫码加入,可以彻底绕开念错与抄错(见二维码生成器);
- 代价:排除 5 个字符相当于字符集从 62 缩到 57,16 位密码的熵从约 95 降到约 93 比特。损失很小,但在需要看清楚的场景里完全值回。
同理,连字符分组显示(如 k7m2-qp9x)只是为了方便分段抄写和朗读,粘贴时按整体处理即可。
为什么不用个人信息
「姓名拼音 + 生日」是最符合直觉的密码原料,也正因为如此,它是攻击者最先尝试的。针对性攻击的字典构建顺序大致是:
- 你的姓名、拼音、缩写、昵称、网名;
- 生日、手机号、纪念日、工号;
- 常见单词 + 年份,配合规则变换(首字母大写、倒序、加
!、a→@);
- 全网泄露库里的密码及其微调版本。
前两类材料在社交平台、公司主页、相册 EXIF 里几乎都能查到;第三、四类则是每个暴力破解工具的出厂配置。更隐蔽的问题是规律性复用:「姓名+站点名首字母」看似每个站都不同,但规则一旦从一个泄露的账号被反推出来,其余账号全部沦陷。
结论很简单:密码的原料必须与「你是谁」完全无关,只有机器随机才能保证这一点。生成之后交给管理器保管,人只负责记住主密码——这套流程绕开了上面所有的坑。改完密码后如果账号绑定了两步验证,别忘了把恢复码也抄一份放进管理器的安全备注。
常见问题
Q:多长的密码才算强密码?
A:对由大小写字母加数字组成的随机密码来说,16 位是当前的主流底线(约 95 比特熵),管理器允许时可以到 20–32 位更稳妥。密码越短,对字符种类的补偿要求就越高:纯小写字母要达到同样强度大约需要 20 位以上。长度是最容易堆的强度,优先加长度。
Q:什么是熵?怎么估算一个密码的强度?
A:熵衡量的是密码的不可预测性,单位是比特。估算方法:每个字符约贡献 log2(字符集大小) 比特——纯小写字母约 4.7 比特/位,大小写加数字 62 个字符约 5.95 比特/位,含全部符号约 6.5 比特/位。用位数乘以每位的熵即得总量:16 位字母数字约 95 比特,而「姓名+生日」这类人选拼凑的密码实际熵可能不到 20 比特,几小时就能被穷举。
Q:密码管理器值得信任吗?主密码忘了怎么办?
A:主流密码管理器采用零知识加密:数据在本地加密后才上传,服务商也看不到你的密码,安全性远高于浏览器明文记住密码和跨站复用。真正的单点是主密码,务必抄写在纸上放于安全处,并开启恢复方式(如紧急联系人、恢复密钥)。忘记主密码且无恢复手段时,数据无法找回,这是设计使然,不是缺陷。
Q:需要定期更换密码吗?
A:现代安全共识是:不要无脑定期改。频繁更换会让人生成「Abc123!→Abc124!」这类弱规律密码,反而降低强度。正确的做法是:出现相关泄露事件时立即改,长期不动的关键账号(邮箱、管理器主密码)可以每 1–2 年检查一次,其余账号只在有理由怀疑泄露时更换。开启两步验证比频繁改密码有效得多。
Q:l/1/I、O/0 这类易混淆字符该不该用?
A:随机生成时可以放心用——密码是复制粘贴进登录框的,不存在「认错」。需要人工抄写、口头传达或在电视上展示的场景(如 WiFi 密码)才建议在生成器里勾选「排除易混淆字符」,去掉 l/1/I、O/0 等。注意排除字符会缩小字符集,略微降低熵,随机密码尽量保留完整字符集。
Q:为什么不能用姓名、生日等个人信息做密码?
A:因为攻击者优先猜的正是这些:密码字典的构建材料排第一的就是姓名、拼音缩写、生日、手机号、纪念日,配合常见变换规则(首字母大写、加感叹号、年份后缀)几秒内即可命中。这些信息往往在社交平台上公开可查。个人信息构成的密码看着「只有自己知道」,实际是攻击面最大的那一类。
免费在线生成强密码
长度与字符集可调 · 排除易混淆字符可选 · 纯浏览器本地生成 · 不上传任何数据
打开密码生成器 →
The Three Pillars of a Strong Password
Whether a password is strong comes down to exactly three things:
- Length: the most effective source of strength. Each extra character multiplies the search space by the alphabet size (×62 for letters+digits);
- Randomness: no pattern in any position. Passwords typed "off the top of your head" almost always contain patterns — common words, keyboard walks, predictable substitutions (a→@);
- No reuse: a great password shared across ten sites is only as strong as the weakest of those sites. Breaches happen; reuse is what turns one breach into ten.
Put together, the practical standard is: one independently generated random password per account, 16+ characters. Memorizing dozens of these is impossible — which is why the third pillar points to the password manager below.
Entropy: The Ruler of Password Strength
"Strong" is vague; cryptography quantifies it with entropy, measured in bits — how many binary guesses an attacker needs on average. It depends on exactly two things: alphabet size × length, provided every character is truly random.
Each character contributes roughly log2(alphabet size) bits:
| Alphabet | Size | Bits per character | 16-char total |
| Lowercase only | 26 | ≈ 4.7 bits | ≈ 75 bits |
| Upper + lower + digits | 62 | ≈ 5.95 bits | ≈ 95 bits |
| All printable symbols | 95 | ≈ 6.5 bits | ≈ 104 bits |
Useful baselines: 80+ bits is comfortable against offline cracking; 100+ bits is effectively unguessable with foreseeable hardware. By contrast, a password assembled from common words plus a year — however long and however many exclamation marks — often carries under 20 bits of real entropy, because every choice in it was made by a human. That's why "P@ssw0rd2024" is worthless: the character classes look fancy, but nothing is random.
So don't try to stuff symbols in yourself — let a machine pick. Generate a 16–32 character random string with the Password Generator, where length and alphabet are explicit and the entropy is computable at a glance.
Working With a Password Manager
The manager solves "what happens after generation". The division of labor is simple:
- The manager stores: dozens of random passwords sit encrypted in one vault with autofill — you only memorize a master password;
- The generator makes them: when signing up anywhere, generate a fresh one with the random Password Generator — 16+ characters, full alphabet, unique per site — and save it to the vault immediately;
- Harden the master password: it's your single point of failure — make it longer (a ~20-character random string, or 4–5 unrelated random words) and enable two-factor authentication;
- Backstop the key account: your email is the reset gate for everything else, so its password and 2FA come first in priority.
When choosing a manager, check three things: zero-knowledge encryption (the vendor can't decrypt your vault), open source or independently audited, and solid autofill with cross-device sync. Browser "save password" features are a stopgap, without dedicated generation or guaranteed encryption strength.
About Look-Alike Characters
Many generators offer an "exclude look-alike characters" option that drops l / 1 / I and O / 0. Whether to use it depends on the scenario:
- Copy-paste scenarios: don't exclude. Web and app logins paste or autofill the string — look-alikes can't be misread, and the full alphabet means slightly more entropy;
- Human-transcription scenarios: exclude them. Wi-Fi passwords read aloud to guests, printed on a meeting-room wall, or handwritten on a sticky note — here
l1I0O is a disaster, so tick the exclusion; incidentally, turning the Wi-Fi password into a QR code lets guests scan to join and skips dictation entirely (see the QR Code Generator);
- The cost: removing five characters shrinks the alphabet from 62 to 57, dropping a 16-character password from ~95 to ~93 bits. A tiny loss that fully pays off whenever a human has to read it.
Hyphen grouping (like k7m2-qp9x) exists purely for easier reading aloud and transcription — paste the whole thing as one string.
Why Personal Information Makes Terrible Passwords
"Name + birthday" is the most intuitive password material — which is exactly why attackers try it first. A targeted attack's dictionary is typically built in this order:
- Your name, its romanization, initials, nicknames, and handles;
- Birthday, phone number, anniversaries, employee ID;
- Common words + year, with rule-based twists (capitalize, reverse, append
!, a→@);
- Previously breached passwords and their near-variants.
The first two categories are public on social profiles, company pages, and photo EXIF data; the last two ship as defaults in every cracking tool. The subtler trap is patterned reuse: "name + first letter of the site" looks unique per site, but once one breached account reveals the rule, every account falls with it.
The conclusion is simple: password material must have zero connection to who you are, and only machine randomness guarantees that. Generate, store in a manager, and memorize one master password — this flow sidesteps every trap above. And once you've changed a password, copy the 2FA recovery codes into the vault's secure notes as well.
FAQ
Q: How long does a password need to be?
A: For random passwords over upper/lowercase letters and digits, 16 characters is the current mainstream floor (~95 bits of entropy), and 20–32 is safer where the manager allows it. The shorter the password, the more the character variety has to compensate: lowercase-only needs roughly 20+ characters for comparable strength. Length is the easiest strength to add — add length first.
Q: What is entropy and how do I estimate a password's strength?
A: Entropy measures unpredictability in bits. Estimate it as log2(alphabet size) per character — about 4.7 bits/char for lowercase, 5.95 for 62 characters of letters+digits, 6.5 with all symbols. Multiply by length: 16 characters of letters+digits ≈ 95 bits, while a human-assembled "name + birthday" password may carry under 20 bits and fall to brute force within hours.
Q: Can password managers be trusted? What if I forget the master password?
A: Reputable managers use zero-knowledge encryption: data is encrypted locally before upload, so the vendor can't see your passwords — far safer than browser-saved plaintext plus cross-site reuse. The real single point of failure is the master password: write it on paper kept somewhere safe and set up recovery (emergency contact, recovery key). If you forget it with no recovery in place, the data is unrecoverable by design — that's the point.
Q: Should I change passwords regularly?
A: Modern consensus says: not mindlessly. Forced rotation breeds "Abc123!→Abc124!" pattern passwords that weaken security. Instead: change immediately after a relevant breach, review critical accounts (email, master password) every 1–2 years, and otherwise change only when compromise is plausible. Two-factor authentication does far more than frequent rotation.
Q: Should I avoid look-alike characters like l/1/I and O/0?
A: For randomly generated passwords, feel free to keep them — they're pasted into login forms and never misread. Only exclude them (via the generator's option) for passwords that humans transcribe, dictate, or display, like Wi-Fi passwords. Note that exclusion shrinks the alphabet and slightly lowers entropy, so keep the full character set for pure random use.
Q: Why shouldn't I use my name or birthday in a password?
A: Because that's precisely what attackers try first: dictionaries are seeded with names, initials, birthdays, phone numbers, and anniversaries, combined with common transforms (capitalization, exclamation marks, year suffixes) that crack in seconds. This information is often publicly visible on social platforms. A "personal" password looks like only you could know it, but it's actually the largest attack surface there is.
Generate Strong Passwords — Free Online
Adjustable length & alphabet · Optional look-alike exclusion · Runs in your browser · Nothing uploaded
Open Password Generator →