Skip to main content

AltF Authenticator

2FA backup codes

Backup codes are single-use codes that let you sign in when your authenticator is not available. Real backup codes must come from each service's security settings. This page generates random codes for your own system or as a template, and gives a checklist for storing the real ones.

  • Free, no sign-up
  • Secrets stay in your browser
  • RFC 6238 self-test built in
  • Works on mobile

Get the real codes from each service

Google, Microsoft, GitHub, Apple and most other services offer backup or recovery codes in their security settings, usually as a list of 8 to 16 one-time codes. Each code works once. The codes generated on this page are not linked to any of those services and cannot unlock them.

Storage checklist

  • Keep at least one copy offline, such as a printed sheet in a safe place at home.
  • Keep it away from the phone that holds your authenticator, so one loss does not take both.
  • A password manager entry is a good second copy, if the manager itself is not protected only by the same phone.
  • Do not keep them as a photo in your camera roll or in your email.
  • Cross out each code when you use it, and make a new set when you run low.
  • Make new codes after any scare. Making new codes usually cancels the old ones.

For developers building backup codes

  • Generate them with a secure random source, as this page does with crypto.getRandomValues.
  • Store only a hash of each code, like a password, and mark codes used as soon as they work.
  • Show them once, and offer download and print, since people rarely copy them by hand.
  • Rate-limit attempts and tell the user by email when a backup code is used.

2FA backup codes: questions and answers

Can I use these codes to sign in to Google?

No. Google backup codes come only from your Google Account security settings. These are random codes for your own use.

Where is the best place to keep backup codes?

Printed and stored somewhere safe at home, plus an optional second copy in a password manager that is not locked by the same phone.

Do backup codes expire?

Usually not, but each one works only once, and generating a new set normally cancels the old set.

Are the codes sent anywhere?

No. They are generated in your browser. Downloading creates a local .txt file.

Authenticator tools and 2FA guides

All authenticator toolsThe full studio: live codes, setup, verify, HOTP, export decoder, backup codes, clock check and self-test.TOTP code generatorGenerate TOTP 2FA codes from a Base32 secret, otpauth:// link or QR image. SHA-1, SHA-256 or SHA-512, 6 or 8 digits, calculated in your browser.otpauth QR code generatorBuild an otpauth:// URI with issuer, account, algorithm, digits and period, and draw the 2FA setup QR code in your browser. Free, nothing uploaded.TOTP secret key generatorGenerate a random 160-bit Base32 TOTP secret with your browser's secure random number generator, plus the otpauth link and QR code. Nothing is sent.TOTP code verifierCheck whether a 2FA code matches a secret within a window of time steps, and see which step matched and the clock drift that implies. Runs in your browser.HOTP generatorGenerate HOTP counter-based one-time passwords per RFC 4226 from a Base32 secret and any counter value. Includes the RFC test values. Runs in your browser.Google Authenticator export decoderDecode a Google Authenticator Export accounts QR (otpauth-migration://) into standard otpauth links and secrets, locally in your browser. Nothing uploaded.2FA code not workingWhy your authenticator code is rejected and how to fix it: check your device clock, the secret, the account and non-default settings. Free clock check.RFC 6238 test vectorsThe 18 RFC 6238 Appendix B TOTP test vectors for SHA-1, SHA-256 and SHA-512, with seeds, times and expected 8-digit codes, run live in your browser.

Guides

AltFTool never receives your secrets or codes. The only network request any tab makes is the clock check, which asks AltFTool's server for the time and carries nothing else.