Account Security•7 min read•

What Are Recovery Codes? How to Store 2FA Backup Codes Safely

What 2FA recovery codes are and where to keep them: common mistakes, password managers and paper copies, when codes stop working and a recovery checklist.

What Are Recovery Codes and Why Do They Matter?

Two-factor authentication (2FA) adds a layer so that a password alone is not enough to get into your account. It has one weak spot: if the device or method that produces the second factor is unavailable, you, the real owner, are locked out too.

Recovery codes (also called backup codes) solve exactly that. When you turn on 2FA, most services offer a set of backup codes. They are usually 8–16 characters of letters and digits, and each one replaces the authenticator or SMS code once.

In short: if your phone is lost, your authenticator app is deleted or your number moves to another SIM, one of these codes gets you back in within minutes.

Lost Devices and 2FA Lockouts

If you use an authenticator app (TOTP), its codes are tied to that phone. If the phone is stolen, broken or lost:

  • The authenticator is gone; in most apps you cannot set it up on a new phone without the original QR code or seed.
  • With SMS-based 2FA the codes go to your SIM; no phone, no SMS.
  • In a SIM swap attack your number can end up with the attacker, and you need recovery codes to win the account back.

Without recovery codes your only option is the service's manual identity check. It can take days, ask for ID documents and fail completely on accounts with little recovery information. For a business email or domain registrar account, that means days of downtime.

Common Storage Mistakes

Having codes is not enough; where you keep them decides everything:

  • Screenshots: if your gallery syncs to the cloud, so do the codes, and photo search and text recognition make them easy to find.
  • Unencrypted note apps: anyone holding your phone for a minute can read them.
  • Emailing or messaging them to yourself: if your email account is locked you cannot reach them either, and chat backups are another leak surface.
  • Plain text files: a "passwords.txt" on the desktop is one of the first places malware looks.
  • Paper in the phone case, wallet or under the keyboard: lose the phone and the codes go with it; lose the wallet and they go with your cards and ID.
  • Reading a code to "support": no genuine support team will ever ask for your recovery code. Anyone who does is phishing.

Digital Storage: Encrypted Vaults and Password Managers

Password manager

Saving recovery codes in a password manager's secure note field (under the matching login, or as a separate "Recovery codes" note) is common and sound. You can reach the manager from any device, independent of the one you are locked out of.

Two conditions:

  1. Your master password must be long and memorable. In line with NIST SP 800-63B, length matters more than symbol rules, and allowing paste makes managers practical.
  2. You need a plan B in case the manager itself locks you out (emergency kit, recovery key), stored somewhere else. Otherwise you have only moved the lock from one door to another.

Encrypted containers

If you prefer not to use a cloud-based manager, keep the codes in a VeraCrypt container or an encrypted USB drive. The risk is losing the file or forgetting its password, so keep at least two copies.

Offline Storage: Paper Copies

Digital solutions depend on power, devices and accounts. A printed copy is a fully offline backup.

Method Strength Watch out for
Password manager (secure note) Reachable from any device, searchable Needs a strong master password
Printed paper + home safe Device-independent, offline Fire and loss; consider a second copy
Bank safe deposit box Highest physical security Slow access in an emergency
Encrypted USB / container Offline and encrypted File loss, forgotten password
Sealed envelope with a trusted relative Geographically separate That person's reliability and home risks

Write the account name and generation date on the paper copy. The ideal setup is two independent locations, one digital and one physical. Wallets, phone cases, monitor edges and keyboards are not suitable.

When Do Codes Stop Working?

Recovery codes are not permanent. Old codes stop working when:

  • Used: in most services each code is valid once.
  • Regenerated: creating a new set invalidates the whole old set.
  • 2FA is turned off and on: re-enabling usually creates a new set.
  • Account recovery: some services reset codes after an identity-verified recovery.
  • Changing your password usually does not affect codes, but services differ. On critical accounts, check that your codes still work after major changes.

Generate a new set when you suspect the codes leaked, you lost the paper copy, you have used most of them or you changed your 2FA method. Reviewing them once a year is a good habit.

After generating a new set, shred the old paper and delete the old digital note. Trying dead codes in an emergency only adds to the panic.

Step-by-Step Recovery Plan

  1. Turn on two-step verification; prefer an authenticator app (TOTP) or security key over SMS. NIST SP 800-63B lists SMS among "restricted" methods because of risks such as SIM swap.
  2. Generate the recovery codes and download or copy them.
  3. Store them in two independent places: one digital (password manager) and one physical (safe or a trusted relative).
  4. Note the account name and date next to the codes.
  5. Test a code: sign out in a private window and sign in with a code. The test uses up that code; for critical accounts you can generate a fresh set afterwards.
  6. Keep your password manager's own recovery plan (emergency kit, master password) in a separate, independent place.
  7. Add a yearly calendar reminder: are the codes current, do the 2FA methods work?
  8. Securely destroy every old code set you replace.

Frequently Asked Questions

How many times can a recovery code be used? In most services once; it stops working after use. A few services accept a code more than once, so check your service's help page.

I lost my codes but can still sign in. What should I do? Generate a new set right away: security settings → two-step verification → backup/recovery codes. The old codes become invalid automatically; store the new ones properly.

I can't sign in and have no codes. What now? You will need the service's official account recovery process. It may ask for ID, take days and still fail. Recovery codes exist to prevent exactly this.

Is it safe to keep recovery codes in a password manager? Yes, as a secure note it is reasonable and common. The conditions are a strong master password and a separate recovery plan for when the manager itself is locked.

Is a recovery code the same as a password? No. A password is a permanent secret you enter at every sign-in; a recovery code is a one-time backup for the second step. One does not replace the other.

If you keep your recovery codes in a password manager, the first requirement is a strong master password. Create one with the Password Generator, or a memorable one with the passphrase generator; both run in your browser and send nothing to a server.

Generate Strong Credentials Instantly

Hardware-backed Web Crypto API with zero logging and zero server contact.

Open Password Generator →