2FA backup codes: what they are and how to store them safely

Backup codes (also called recovery codes) are your spare key when your authenticator app isn't available. Most people skip them and regret it the day their phone disappears.
What are backup codes?
When you enable 2FA, many services give you a list of about 8–10 codes. Each code works once in place of your app code. They don't expire with time, so a printed copy still works years later.
Generating a new set immediately invalidates the old one.
Where to get them
- Google: myaccount.google.com → Security → 2-Step Verification → Backup codes. You get ten 8-digit codes.
- Facebook: Settings → Accounts Center → Password and security → Two-factor authentication → your account → Additional methods → Recovery codes.
- GitHub, Microsoft, Discord, X… all offer recovery codes in their security settings, usually shown when you turn on 2FA.
- Crypto exchanges like Binance often don't offer backup codes. Instead, save the secret key when you set up 2FA (see what a secret key is).
Where to store them
Rule of thumb: keep them away from your phone (so losing the phone doesn't lose the codes) and away from your password (so one leak doesn't expose both).
| Storage | Verdict |
|---|---|
| Printed on paper in a safe or file drawer | Excellent: can't be hacked remotely |
| Password manager secure note (Bitwarden, 1Password…) | Good, if the manager has its own 2FA |
| Strongly encrypted archive on a USB drive | Good, keep a second copy |
| Screenshot in your phone's photos | Poor: lost with the phone, synced to the cloud |
| Emailed to yourself, unlocked notes app | Poor: lost if your email is compromised |
How to use one
- At the 2FA prompt, choose "Try another way" or "Use a backup code".
- Enter an unused code and cross it off your list.
- Once you're in, set up your authenticator again and generate a fresh set if you're running low.
FAQ
How many times can a backup code be used?
Each code works once. A set usually has 8–10 codes, and generating a new set invalidates the old one.
What if I lose both my phone and my backup codes?
Use a saved secret key if you have one, otherwise the service's official account recovery process.


