Backup Codes
Generate N cryptographically random recovery codes for 2FA. Configurable alphabet (base32 / numeric / alphanumeric), code length, and group separator. Pairs with totp-code and hotp-code for enrollment.
About Backup Codes
Backup Codes generates a set of cryptographically random recovery codes for two-factor authentication — the fallback users lean on when they lose their authenticator device. You configure how many codes, the alphabet (base32, numeric, or alphanumeric), the code length, and an optional group separator for readability. Generation uses your browser's secure randomness, so the codes are created locally and never transmitted.
- Category
- create
- Input
- Accepts: */*.
- Output
- Outputs: application/json.
- Cost
- Free, runs in your browser
- Memory
- low
Common uses
- Issue a batch of one-time recovery codes during a user's 2FA enrollment flow
- Generate numeric-only backup codes for a system where users type them on a phone keypad
- Produce readable codes with a dash separator (e.g. ABCD-EFGH) for a printed recovery sheet
- Create base32 recovery codes to sit alongside a TOTP or HOTP secret you're provisioning
- Spin up test recovery codes for QA of an account-recovery path
Frequently asked questions
How random are the codes?
They're generated with cryptographically secure randomness, suitable for security-sensitive recovery codes rather than predictable pseudo-random output.
What can I configure?
The number of codes (N), the alphabet (base32, numeric, or alphanumeric), each code's length, and an optional group separator for legibility.
Are the codes sent anywhere?
No. They're generated entirely in your browser. Nothing is uploaded, so the recovery codes exist only where you create and save them.
What format is the output?
JSON containing the generated codes, ready to display, store hashed, or hand to a user.
Do these work with my authenticator setup?
They're standalone recovery codes meant to pair with TOTP or HOTP enrollment. Store a hashed copy server-side and let each code be used once.
Keywords
- backup
- codes
- 2fa
- recovery
- mfa
- auth
- random
- generate