Inside this guide
Keep your two-factor authentication (2FA) backup codes somewhere you can reach if your phone disappears. A paper copy in a locked drawer is a good starting point. An encrypted password manager can also work if you can open its vault on another trusted device without relying on the phone or the account you're trying to recover.
Google and GitHub issue one-time codes you can use when your usual second factor is unavailable. Google uses a backup code for the second step of sign-in. You still need to complete the first step. Other providers may have different recovery options.
Get the codes while you can still sign in
Open the service's security settings directly from your account. Start with your primary email because it may be needed to recover other accounts.
If you download a plain-text copy to print or move into a vault, check where it landed and remove the temporary file afterward. Make sure it did not leave an extra copy in a synced folder. Use a printer you control. A sheet left on a shared printer still contains usable codes.
How to store 2FA backup codes safely
Paper in a locked place
Store a printed or handwritten copy with important documents in a place you control. On the copy, note the date you generated the set. Label it with the service and enough of the account name to tell it apart from others. Keep the paper at home rather than in the bag that holds your phone. Consider whether you could reach it when traveling and whether another sign-in method would help while you're away.
An encrypted password manager
Use a secure note or the vault's dedicated field for recovery codes. Check what a fresh sign-in to the vault requires. If your only approval device is the missing phone, or the vault needs an email you can no longer open, the codes may be out of reach. Keeping both passwords and backup codes in one vault also means a compromise of that vault can expose both.
Choose a backup you can retrieve with the phone unavailable.
Suppose your vault asks for approval by email when you sign in on a new device, and your email backup codes are inside that vault. With a paper copy of the codes and an independent way to complete the first sign-in step, you can get into email first.
Rehearse retrieval without using a code
Set your phone aside and leave your existing account sessions open. On a device you control, see whether you can reach the correct paper copy or unlock the vault independently. Check that the account label lets you find the right set. This exercise checks retrieval. Completing an actual sign-in with Google or GitHub would spend the code you enter.
If you are moving to a new phone and still have the old one, confirm your usual sign-in works with the new phone before wiping the old one. Keep a second sign-in method where the service supports it and store it separately from the phone. For example, a spare security key at home can help if you lose both your everyday key and phone.
Replace codes if a copy may have leaked
Google and GitHub invalidate the old set when you generate a new one. Update every place you keep a copy, then remove the old files and shred outdated printouts. If you use a single code during a normal sign-in, mark that code as used. Generate a fresh set if you run out or suspect exposure.
Cover illustration generated with AI.
Prepared with AI-assisted research and writing using the sources below.
Sources
https://support.google.com/accounts/answer/1187538?hl=en
https://pages.nist.gov/800-63-4/sp800-63b.html#saved-recovery-codes



