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.