2FA Backup Codes
What backup codes are, where each platform hides them, how they are consumed, and how to store them without losing them.
Last updated: Sep 22, 2026 10:37:21
Backup codes are the thing standing between a lost phone and a lost account. They are a short list of single-use strings that work in place of your authenticator code — no app, no clock, no network. Every major service offers them, and almost everyone ignores them until the day they need them.
This page covers what they are, where each platform hides them, how to store them without losing or leaking them, and what happens when you use one.
What they actually are
A backup code is a pre-generated password that substitutes for your second factor. The service stores a hash of each code; you keep the plaintext. When the authenticator is unavailable, you type a code instead, and that code is consumed.
- Single-use. Each code works once. Ten codes mean ten recoveries, not unlimited ones.
- Independent of the device. No app, no clock, no SIM card. This is precisely why they survive the failure modes that break everything else.
- Equivalent in power to your factor. Anyone with a code skips the second factor entirely. Treat them like passwords, not like receipts.
- Often displayed exactly once. If you close the page without copying them, they may be gone — some services let you regenerate, some make you re-authenticate first.
The uncomfortable truth: a backup code is a permanent bypass until it is used or regenerated. Store it better than you store the codes it replaces, because it never expires on its own.
Where to find them, by platform
| Service | Location | Notes |
|---|---|---|
| Security → 2-Step Verification → Backup codes | Ten codes. Shown once; you can generate a new set, which invalidates the old one. | |
| Microsoft | Security → Advanced security options → Recovery code | A single long recovery code rather than a list; store it the same way. |
| Apple ID | No backup codes | Apple uses trusted devices plus a 28-character recovery key. Recovery is either a trusted device or Account Recovery, which takes days. |
| GitHub | Settings → Password and authentication → Recovery codes | Sixteen codes, downloadable as a file. Download and move it somewhere durable. |
| Social and SaaS | Security settings → Two-factor → Backup / recovery codes | Usually ten codes; a few services call them “recovery codes” or “emergency codes”. |
| Banks | Usually none | Typically replaceable only in branch or by phone with identity verification. |
Backup codes are not the only fallback
Three different mechanisms get grouped under “recovery”, and they behave differently:
| Mechanism | How it works | Weakness |
|---|---|---|
| Backup codes | A list of single-use strings that skip the second factor | Permanent bypass until used; often saved badly |
| Recovery key (Apple, some disk encryption) | One long string that resets access entirely | Single point of failure; losing it means recovery by waiting |
| Trusted device | An already-signed-in device confirms a new login | Only helps while that device exists and is unlocked |
A good setup has all three where available: codes for the day the phone is gone, a trusted second device for convenience, and recovery details that do not depend on either.
How services store them
A backup code is stored as a hash, not as text. When you type one, the service hashes what you entered and compares. That is why a support agent genuinely cannot read your codes back to you, and why a leaked database does not hand out working bypasses.
It also explains the two behaviours people find surprising: codes are shown exactly once, and regenerating a set invalidates the previous one immediately. Neither is an oversight.
How to store them so they survive
The test is simple: can you reach them when your phone is gone? That single question rules out the most common mistake — saving them in the authenticator app or in a note on the same device.
- Put them in a password manager if you can open that manager on another device. One entry per account, labelled with the date generated.
- Or print them. A sheet of paper in a drawer you already use for documents beats a screenshot in a synced camera roll. Paper does not get ransomware.
- Never in email, chat, or a cloud note that the account itself could unlock. That is circular: the recovery material sits behind the thing it is supposed to recover.
- Label them. “Ten codes, Google, generated 2026-12” is worth more than a bare list you cannot identify in a year.
If your threat model includes a house fire or a stolen bag, split them: one copy at home, one in a password manager. Two locations, both reachable without the phone.
Using one, and what changes afterwards
- On the login screen, choose the option that is not “enter the code from your app” — usually “Use a backup code”, “Try another way”, or “More options”.
- Type one code from the list.
- Sign in, then go straight to security settings and generate a fresh set. The used code is dead, and you now have one fewer.
- Re-enrol the authenticator on a working device — see how to set up 2FA.
Some services show you the remaining count; most do not. Assume the set is degraded after any use and replace it.
If you cannot find them
Work in this order, and stop as soon as one works:
- A signed-in session. An open browser or a still-logged-in app can often re-enrol the factor without a code.
- Account recovery. Recovery email, recovery phone, or the provider’s identity verification.
- Provider support. Slow, sometimes impossible for consumer accounts, and faster for business accounts with a contract.
Do not reset the account before confirming that recovery is actually available. Lost your phone walks through the order of operations; 2FA code not working covers the case where the code exists but is rejected.
When to regenerate
- After using any code from the list.
- After changing phones or reinstalling the authenticator.
- After removing or adding a second factor on the account.
- If the list was ever visible to someone else — a shared screen, a photo, a chat message.
- Annually, as a habit. It costs two minutes and invalidates anything quietly leaked.
Five mistakes that turn backup codes into a false sense of security
- Saving them on the phone they are meant to replace. The single most common failure.
- Assuming they never expire. Regenerating invalidates the old list; a stale printout is worthless and may be dangerous.
- Storing them in the account’s own cloud drive. If someone gets into the account, they get the bypass too.
- Sharing them “just in case” with a colleague or family member. That creates a second, unmanaged factor.
- Never testing one. A code you have not tried is a hypothesis. Test on a session you can afford to lose, then regenerate.
What to do right now
Open the security settings of your email account — the master key to everything else — and generate backup codes. Store them somewhere you can reach without your phone. Then repeat for banking and any account that can reset the others.
If you are setting 2FA up for the first time, how to set up 2FA puts this in the right order; if the phone is already gone, go to lost your phone.
Frequently asked questions
Where are my Google backup codes?
Security settings, under 2-Step Verification, in the Backup codes section. They are shown once; generating a new set invalidates the previous one.
How many backup codes do I get?
Usually ten, though some services issue sixteen or a single long recovery code. The count matters less than where you store them.
Do backup codes expire?
Not on a timer, but they are invalidated when you regenerate the set or change the enrolled factor. A stale printout is worthless.
Can a backup code be used twice?
No. Each code is single use, and the used one is dead immediately.
What if I lost my backup codes?
Use a signed-in session, then the provider's account recovery. Without either, a human at support is the only route.
Are backup codes as strong as the app?
They are equivalent in access but permanent until used, so they are a weaker control overall. Treat them like passwords, not like one-time codes.