Backup Codes Generator
🔒 Drawn with crypto.getRandomValues, 100% in your browser. Nothing is sent anywhere — refresh the page and the codes are gone. Save or download them before you leave.
⚠️ Each code works exactly once, and a leaked list is a full compromise: every code on it works until you revoke the set. Print the list or store it in a password manager — never as a screenshot or a plain file.
Copied to clipboard.
Online model, not offline. Backup codes are checked by the server, one at a time, so there is no hash to crack offline — the number that matters is the chance of guessing one code in 10 tries before the account locks. That is why even the 8-digit format is fine against guessing, and why the list itself is the thing to protect.
How this estimate works
Entropy = log₂(combinations). Combinations = poollength, where the pool is 10 for digits, 62 for letters + digits, and 16 for hex. "Chance in 10 tries" = 10 ÷ combinations — the same lockout model used across PasswordLab.
Quick reference (per code)
- 8 digits — 26.6 bits, 100,000,000 combinations. Guessing chance in 10 tries: 0.00001% (1.0e-5%). The format most services use — safe only because the server locks after a few wrong tries.
- 8 letters + digits — 47.6 bits, 2.2 × 1014 combinations. Guessing chance in 10 tries: 4.6e-12%. Over two million times the space of 8 digits, for the same typing effort.
- 16 hex — 64.0 bits, 1.8 × 1019 combinations. Guessing chance in 10 tries: 5.4e-17%. The margin format — choose it when a service accepts longer codes.
A backup code is a spare key, not a password: it is single-use, server-checked, and worthless once the set is revoked. If you lose the list, generate a new set in the service's security settings — the old codes stop working the moment the new set is issued. And if you still use SMS codes, note that a backup code printed on paper cannot be SIM-swapped; see the TOTP Authenticator for the everyday second factor that pairs with these codes.
FAQ
What are backup codes?
Backup codes are single-use recovery codes a service gives you when you turn on two-factor authentication. Each code works once, as a spare key for the day you lose your phone or your authenticator app. Once a code is used it is burned and can never work again.
Is an 8-digit backup code secure?
Against online guessing, yes: an 8-digit code has 100,000,000 combinations (26.6 bits), so an attacker who gets 10 tries before lockout has only a 0.00001% chance. The real risk is not guessing — it is the list leaking. Every code on a leaked list works, so a stolen list is a full compromise until you revoke and regenerate it.
How should I store backup codes?
Offline and separate from your password: printed on paper in a safe place, or in your password manager. Never in a plain text file on your desktop, never as a screenshot in your photo roll, and never sent to yourself by email or chat — those are exactly the places that get copied in a breach.
What happens when I run out of codes?
Generate a fresh set in your account's security settings. The new set replaces the old one — any unused codes from the old set stop working, so print or save the new list before you close the page.
How random are the generated codes?
Each character comes from crypto.getRandomValues with rejection sampling (no
modulo bias), entirely on your device. There is no server, no analytics, no network request.
Does this site see my backup codes?
No. Generation and all math happen inside this page. Refreshing destroys the codes, so save or download them before you leave — this page cannot recover them for you, and neither can anyone else.