Backup codes are the spare key for your two-factor login. Most people skip them during setup, and regret it when a phone dies. This how-to is part of our two-factor login and passkeys guide.

What backup codes are

When you turn on two-factor login, many sites give you a list of eight to ten codes, or sometimes a single recovery key. Each code works once, in place of your usual second factor.

They exist for the moment when your phone is lost, broken or stolen. Our guide on getting back in after losing your phone shows how they fit in.

How to save them

  1. Turn on 2FA, and look for "backup codes" or "recovery codes".
  2. Copy them down by hand, or print them on a home printer.
  3. Label them with the account name.
  4. Store them somewhere private.
  5. Test one if the service makes it easy, and then generate a fresh set.

Where to keep them

LocationRatingWhy
Paper in a home safe or locked drawerGoodOffline and easy to reach
A sealed envelope with someone you trustGoodSurvives a house fire
Password managerFairConvenient, but a single point of failure
Notes app on your phonePoorLost along with your phone
Email to yourselfPoorIf you are locked out, you cannot read it
Photo in your camera rollPoorSynced and easy to find

Common mistakes

  • Not saving them at all. You usually see them just once.
  • Keeping them on the only device with your authenticator. One lost phone takes out both.
  • Not replacing used codes. Once you are running low, generate a new set.
  • Forgetting them on your password manager account. That account may be the one you need most. See emergency access and backups.

Treat them like passwords

Anyone with your password and a backup code can log in. Never type one into a site you reached from a link, and never read one to someone over the phone. Scammers ask for these codes too. See fake password reset emails.