Backup Codes: How to Set Up and Keep Them Safe
In this article
Yes, you can set up backup codes in your account settings; they give you a one‑time password when you lose access to your primary two‑factor authentication (2FA) method.
What You'll Need
- A computer, smartphone, or tablet with internet access.
- Access to the account for which you want to generate backup codes.
- A secure place to store the printed or saved codes (e.g., a password manager, a sealed envelope, or an encrypted file).
Step-by-Step
- Log in to the account you want to protect. If you are already signed in, go to the main dashboard or profile page.
- Navigate to the security or two‑factor authentication section. This is often found under Settings > Security, Settings > Account, or a similar path. Labels may differ slightly between desktop and mobile versions.
- Locate the option labeled “Backup codes,” “Recovery codes,” or “Emergency codes.” If you do not see it, look for a link that says “Generate new codes” or “View backup options.”
- Click the button to generate a new set of codes. Most services will display a list of ten 8‑digit codes. Write down the exact wording that the service shows about the one‑time‑use nature of each code.
- Immediately copy the list to a secure location. Recommended options:
- Print the codes on paper and place the paper in a fire‑proof safe.
- Save the list in an encrypted password‑manager entry (e.g., 1Password, Bitwarden).
- Store the file on an encrypted USB drive that you keep in a locked drawer.
- If you choose to keep a digital copy, verify that the file is encrypted (use AES‑256 or a comparable standard) and that the password for the encryption is not stored on the same device.
- Mark the codes as “used” in your notes after each successful login with a backup code. This prevents accidental reuse, which most services reject.
- Set a reminder to regenerate a fresh set of backup codes every 3–6 months, or immediately after you suspect any of the stored codes might have been exposed.
- Test one code in a controlled environment: sign out of the account, then attempt to log in using a backup code while you still have another device logged in. This confirms the codes work and that you have stored them correctly.
- Once you have verified the codes, delete any unencrypted copies from your device’s clipboard, temporary files, or cloud-synced notes.
Common Mistakes
- Saving the codes in plain‑text files that sync to cloud services (Google Drive, iCloud, etc.). If the cloud account is compromised, attackers gain immediate access.
- Printing the codes on regular paper and leaving them in an obvious place such as a desk drawer or under a keyboard.
- Relying on a single backup location. If the paper is lost in a fire or the USB drive fails, you are back to square one.
- Forgetting that each code is single‑use. Trying to reuse a code will lock you out of that recovery method.
- Generating new codes without first deleting the old set. Some services keep the old set active for a short window, which can create confusion about which codes are valid.
Tips
- Use a dedicated “Recovery” entry in your password manager so the codes are not mixed with regular passwords.
- Label the printed sheet with the account name, the date of generation, and a reminder to rotate the codes.
- If you travel frequently, keep a digital copy on an encrypted USB stick rather than a phone, which is more likely to be lost.
- Consider storing the paper copy in a sealed, waterproof bag inside a fire‑proof safe for added durability.
- When rotating codes, immediately destroy the previous printed sheet (shred it) and securely wipe any digital copies.
Troubleshooting
If a backup code is rejected, follow these steps in order:
- Confirm you are using the exact code as displayed, without extra spaces or line breaks.
- Make sure the code has not already been used. Most services invalidate a code after one successful login.
- Check the service’s status page to see if there are ongoing authentication issues.
- Log out of all devices, then log back in and try the code again. Some platforms cache a failed attempt and reset after a fresh session.
- If the code still fails, generate a new set of backup codes (you will need to be logged in on a trusted device). Follow the steps in the “Step‑by‑Step” section to replace the old list.
- Should you be completely locked out, look for the “Account recovery” or “Contact support” link on the login page. Most providers will ask for alternate verification (email, phone number, or ID) before issuing new codes.
Frequently Asked Questions
Can I use the same backup code on multiple devices?
No. Each backup code is designed for one‑time use only. After a successful login, the code becomes invalid.
What happens if I lose the paper copy of my backup codes?
You will need to generate a new set from a device that still has access to the account. Until then, you may have to rely on other recovery methods such as email or SMS verification.
Are backup codes encrypted by the service when they are generated?
Most services display the codes in plain text only at the moment of generation; they do not store them in a retrievable format. This is why you must keep a secure copy yourself.
Do backup codes work for every two‑factor method?
Backup codes are a fallback for most 2FA methods (authenticator apps, SMS, hardware keys). However, some enterprise solutions may require a separate recovery process.
Is it safe to store backup codes in a password manager?
Yes, provided the password manager uses strong encryption and you protect the master password with a unique, high‑entropy phrase.