2FA Recovery Codes Basics
2FA recovery codes are one-time backup strings that let you sign in when your second factor fails, such as a lost phone, a broken authenticator app, or a SIM swap you did not initiate. Most services generate a set of codes during 2FA setup, then show them once or require a re-download from account security settings. Each code is typically usable once, and the service marks it as consumed after successful login.
In practice, recovery codes act like a spare key for the login flow. If your authenticator app stops working, you enter a recovery code instead of the time-based code. If you rely on SMS 2FA and your number changes, recovery codes still work because they bypass the second-factor channel. Some providers also support backup codes for hardware security keys, but the exact behavior varies by service.
Because codes are single-use, the number you keep matters less than whether you can access them when you need them. A set of 10 codes might be enough for a single lockout event, while a set of 20 can cover multiple incidents across devices, travel, or app reinstall cycles. The tradeoff is storage risk: more codes means more secrets to protect.
How Many Codes To Keep
The right number depends on how many times you realistically expect to need a backup login before you can restore your second factor. For most people, a single lockout event is the baseline scenario: phone lost, new phone setup, authenticator app reinstalled. In that case, a set of 8 to 12 one-time codes often covers the “try once, then try again if something else is wrong” pattern, plus one extra code for a second attempt after a temporary lockout clears.
If you manage multiple devices or travel often, you may need more. A common pattern is: you set up 2FA on one phone, then later add a second phone or tablet. If you later lose the first device and then the second device before you finish reconfiguring 2FA, you can burn several codes quickly. In that scenario, 15 to 25 codes can be more realistic. If your provider generates exactly 10 codes by default, you can usually regenerate after you store them, but regeneration may invalidate the old set, so you should only regenerate when you have a safe place to store the new set.
Some providers let you download codes as a file. If you do that, treat the file like a password database entry. A mild frustration point: many people download the codes, then forget the file name and store it in a folder that later gets synced to a shared drive. That turns a one-time backup into a long-lived secret spread across systems.
As a practical rule, aim for enough codes to cover two full “recovery attempts” plus one buffer for account-side delays. If your provider shows a set size, choose the largest set you can store safely. If you cannot store safely, fewer codes with better protection beats more codes in a weak location.
Store Codes In Two Places
Use two independent storage locations so a single failure does not erase your backup. One location should be offline or hard to access remotely, such as a paper copy in a locked drawer or a hardware password manager vault. The second location can be encrypted and synced, such as an encrypted file stored in a personal vault. If you store codes in a password manager, store them as a secure note entry with a strong master password and 2FA on the manager itself.
For a concrete target, store at least 10 codes in each location if your provider generates 10. If your provider generates 20, store all 20 in the primary location and a subset in the secondary location, then keep the rest in the primary. This reduces the number of secrets exposed in the secondary location. I have seen people print 10 codes, then keep the paper in a desk drawer that also holds other account documents, which defeats the point of separation.
Protect Codes Like Passwords
Recovery codes are effectively bearer credentials. Anyone who has them can log in without your phone or authenticator. Use encryption for digital storage and avoid plain text files. If you must store them in a document, encrypt the document and restrict access. For offline storage, use tamper-resistant paper storage or a locked envelope.
Do not email recovery codes to yourself. Email is often accessible through multiple channels, including browser sessions and device sync. Also avoid storing codes in shared cloud folders with broad permissions. A small aside: on Windows 11, the “recent files” list can reveal document names, so even if the content is encrypted, the filename can leak that you stored 2FA backups.
Test Your Backup Plan Once
Do a low-risk test that does not lock you out. The safest approach is to verify that you can reach the recovery-code entry screen and that you know where the codes are stored. Some providers let you regenerate codes, which can be a test, but regeneration may invalidate old codes. If you regenerate, store the new set immediately and do not rely on the old set.
Set a reminder to review your 2FA setup every 6 to 12 months. During review, confirm your recovery codes are still accessible and that your second factor still works. If you use an authenticator app, check that you can export or transfer accounts if your app supports it. For example, Authy and some authenticator apps offer account transfer flows, but the exact steps depend on your app version and whether you enabled backups.
Choose Numbers By Your Risk
Use a simple risk model based on how often you change devices and how quickly you can restore 2FA. If you keep the same phone for years and you have a second device for account access, 8 to 12 codes can cover a typical lockout. If you frequently replace phones, use multiple operating systems, or travel with intermittent connectivity, 15 to 25 codes can reduce the chance that you run out mid-recovery.
If your provider offers only a fixed set size, store that set in two places and focus on recovery speed. The number of codes matters less than your ability to regain access to the account settings page. If you cannot access the settings page, more codes do not help because recovery codes still require you to reach the login flow.
Case Examples For Real Scenarios
Lost Phone During Travel
Alex set up 2FA on email using an authenticator app and saved 10 recovery codes as a screenshot on a phone. During a trip, the phone was lost. Alex used a laptop to sign in and entered recovery codes, but the screenshot was gone because it was stored only on the lost device. Alex had to use the provider’s account recovery process, which required extra verification and took two days. The lesson was not “use more codes,” but “store codes in a second location before travel.”
Authenticator App Reinstall
Sam used 2FA with an authenticator app and stored recovery codes in a notes app. After reinstalling the operating system, Sam could not access the notes because the sync account was temporarily disabled. Sam tried multiple recovery codes during a login attempt, then hit a temporary rate limit. The account was not permanently locked, but the delay meant Sam burned several codes quickly. Sam later moved the codes into an encrypted password manager entry and added a reminder to verify access after major device changes.
Recovery Code Checklist
Use this checklist to decide how many codes to keep and where to store them.
| Situation | Typical Code Need | Storage Pattern | What To Verify |
|---|---|---|---|
| Single phone, long device life | 8 to 12 codes | Offline copy + encrypted vault | You can find codes during login |
| Frequent phone changes | 15 to 25 codes | Two vaults, one offline | Authenticator transfer path works |
| Multiple devices logged in | 10 to 20 codes | Primary encrypted + secondary minimal set | Recovery codes are not invalidated |
| Provider generates fixed set size | Store the full set | Two independent locations | Regeneration rules are understood |
If you want a single decision shortcut: choose the largest set you can store in two protected places, then stop generating new sets unless you have a reason.
Common Mistakes To Avoid
One mistake is storing recovery codes in the same place as the second factor. If your authenticator app backup and your recovery codes both live in the same cloud account, a single compromise or lockout can break both. Another mistake is assuming recovery codes never expire. Many services do not expire them quickly, but they can be invalidated when you regenerate, change 2FA methods, or reset security settings.
People also burn codes by entering them incorrectly. A code might contain hyphens or spaces, and copying from a screenshot can introduce extra characters. If you have to type them, use a careful copy method or store them in a text field that preserves formatting. Some providers display codes with spacing for readability, and the login form may require the exact characters.
Another practical error is ignoring rate limits. If you enter multiple wrong codes, the provider may temporarily restrict login attempts. That restriction can make it look like the codes are “not working,” when the real issue is the account-side throttle. If you are unsure, pause and verify the code characters before retrying.
Finally, avoid sharing recovery codes with family members unless the provider’s terms and your threat model support it. Recovery codes are not “account access tokens” in the same way as delegated roles. Sharing them can create a situation where someone else can log in without your phone, and you may not notice until later.
FAQ
Do Recovery Codes Expire?
Many services do not set a short expiration timer, but they can invalidate codes when you regenerate them, change 2FA settings, or reset security. Check the provider’s help page for the specific invalidation rules.
How Many Codes Should I Save?
Save enough to cover two recovery attempts plus a buffer for delays. For many users that means 8 to 12 codes, while frequent device changes often fit better with 15 to 25 codes.
Can I Reuse A Recovery Code?
Recovery codes are typically one-time use. After a successful login, the service marks that code as consumed, so reuse usually fails.
Where Should I Store Recovery Codes?
Store them in two independent protected locations. A common pattern is an offline copy plus an encrypted password manager entry or encrypted file stored in a personal vault.
What If I Lose Both My Phone And Codes?
Use the provider’s account recovery process, which usually includes identity verification steps. The exact steps vary, and some services may require additional proof beyond the 2FA setup.
Author's Insight
Recovery codes are a security backstop, not a second password. Their usefulness depends on storage access, formatting accuracy, and the provider’s invalidation rules when you regenerate or change 2FA methods. A practical approach is to store codes in two protected places and verify that you can reach the recovery-code entry screen without needing the lost device.
Because providers vary, readers should treat the provider’s help documentation as the source of truth for code invalidation and one-time behavior. If you want a measurable plan, set a calendar reminder to review 2FA and confirm your backup access after major device changes.
Key Takeaways
- Recovery codes are usually one-time credentials that bypass your second-factor channel during login.
- Keep enough codes to cover two recovery attempts plus a buffer, then stop generating new sets unless you must.
- Store codes in two independent protected locations, not only on the same device as your authenticator.
- Test your backup plan by confirming you can reach the recovery-code entry flow and by verifying where the codes are stored.
- Avoid copying errors and rate-limit traps by checking formatting and pausing before repeated attempts.