Skip to content
OTP Generator

Backup Code Generator

Create random one-use recovery codes using your browser’s cryptographic random number generator. Copy or download them as a text file.

1Choose how many codes and the format

2Save your backup codes

    On this page

    Who uses this

    Developers adding 2FA to their own app need recovery codes for users; admins sometimes need one-off codes for shared processes. Codes here are made with crypto.getRandomValues, the same secure source browsers use for encryption.

    Important

    This tool does not create backup codes for Google, Facebook or other services. Those codes must come from the service itself (usually under Security → Two-step verification → Backup codes). See our backup codes guide.

    Frequently asked questions

    How random are these codes?

    Each character comes from the browser’s cryptographically secure random generator. An 8-digit code has 100 million possibilities; the 12-character format has about 60 bits of entropy.

    Should backup codes be stored hashed?

    If you are building an app, yes: store only a hash of each code (like a password) and mark a code used once it is redeemed.

    Need a code right now?

    Paste your key and get the current 6-digit code in seconds. Free, private and nothing to install.