Building in public. Follow along on X

Guide

2FA backup codes: where to keep them and who holds them

Backup codes are a short list of one-time codes that let you sign in when your normal two-factor method is gone. Save them when you switch 2FA on, keep them somewhere other than the phone that holds your authenticator app, and for any account the project depends on, make sure two people know where they are.

By Matt Warcholinski, co-founder of Brainhub · Updated 23 November 2026

Not legal or security-compliance advice. This guide is about who can get back into your project's accounts. Menus and limits change, so confirm every click in the provider's own help before you rely on it. Never paste a real backup code into a chat, a document that others can edit, or an AI tool.

What are 2FA backup codes?

Two-factor authentication asks for a second proof after your password, usually a code from an app on your phone. Backup codes are the spare. The service gives you a list of codes when you turn 2FA on, and each one works once.

Google's help page says a used code "becomes inactive" and that you can get a new set of 10 whenever you want. GitHub says that once you use a recovery code it "cannot be reused", and refers to a list of 16. Cloudflare says each backup code is "one-time use only". The names differ (backup codes, recovery codes) and the counts differ, but the idea is the same.

NIST, the US standards body, describes the same thing in its digital identity guidelines as a "look-up secret": a secret from the list "SHALL be used successfully only once". That is the formal version of "burn after use".

Backup codes matter because 2FA moves the weak point. Without 2FA, a stolen password is the risk. With 2FA, a lost phone is the risk. The codes are what you use on the day the phone is in a lake.

Why a team needs a plan for backup codes, not just a download

Most advice on backup codes is written for one person with one account: download the file, print it, put it in a drawer. That works for your own email. It breaks for a project with several people and shared accounts.

Here is how it goes wrong in a small team, in the order I would expect it:

None of these need an attacker. They need nobody to be in charge. This is the same missing-owner problem that the shadow IT guide describes for accounts, and the same single point of failure as in the bus factor guide.

Where should I store backup codes?

The vendors agree on the general rule, and it is worth reading what each one says. Google says to keep codes somewhere safe, "like where you keep your passport or other important documents", and not to share them with anyone. GitHub recommends a secure password manager and says not to share or distribute your recovery codes. Cloudflare's page says to save them in a secure location, and, in the email 2FA section, somewhere safe like a password manager.

Turn that into a choice you can make today. The table compares the usual options.

WhereGood forWatch out forMy verdict
Password manager, shared vaultProject accounts that more than one person must recoverThe vault's own login becomes the key to everything, so it needs strong 2FA and its own recovery planMy first choice for team accounts
Password manager, personal vaultYour own accountsUnreachable by teammates if you leave or are illFine for personal accounts only
Printed copy in a safe placeA last resort that needs no deviceCan be lost, burned or read by whoever finds itGood as a second copy for the most critical accounts
File on one laptopNothing in particularDisk failure, theft, one person's accessAvoid as the only copy
Photo on the phone with your authenticatorNothing in particularSame device as the thing the codes are meant to replaceAvoid
Team chat, shared doc, email to yourselfNothingReadable by many people for years, and searchableNever

The general principle is simple: the codes and the authenticator must not fail together. If one event can destroy both, you do not have a backup.

Who should hold the backup codes in a team?

This is the question most guides skip. A team has three realistic models. I would pick by how critical the account is.

  1. One owner, one named backup. The owner holds the codes. A second person knows where the copy is and can open it. This is my default for domain, hosting, code host and payment accounts.
  2. Shared vault, two admins. The codes sit in a shared password manager vault that two or more trusted people can open. It scales better than a single owner but widens who can read them.
  3. Sealed copy, break glass. One printed copy is kept somewhere two people can reach, and used only in an emergency. Slow, but it survives almost anything digital.

Whatever you choose, do not rely on "the team" holding them. A list owned by everyone is owned by no one. Write down a name for each account, as you would for any other asset, and a second name for the backup.

One more point. Backup codes belong to an account, not to a person. If the account is the company's domain, then the codes should move with the role, not with the human. When someone leaves, generating a fresh set is part of the handover, which the offboarding checklist covers.

How to set up and rotate backup codes: a 15-minute routine

Do this once per important account, then again whenever the list is low or a person leaves.

  1. Pick the accounts. Start with the high-risk ones: domain registrar, code host, hosting, payment processor, email that receives resets.
  2. Check that backup codes exist for that service. Some services call them recovery codes, and some use other methods instead. Look in the security settings.
  3. Generate a fresh set. Treat the new set as the only valid one. Both Google and GitHub say that creating new codes makes the old set inactive, and Cloudflare says regenerating invalidates the previous codes.
  4. Store them straight away in the place you decided on, not in the downloads folder.
  5. Tell the backup person where they are, not what they are. "They're in the shared vault under Registrar" is enough.
  6. Log it. Write the date, the account and who holds them, as in the template below.
  7. Set a review date. A quarterly check is plenty for a small team. Replace the set when few codes remain or after anyone with access leaves.

Where to find backup codes in Google, GitHub and Cloudflare

I opened the official help for three services on 23 November 2026. The paths below are what those pages said on that date. Menus change, so check the page if yours looks different.

ServiceWhere to lookWhat the page says
Google AccountGoogle Account, then Security, then 2-Step Verification, then Backup codesYou can get a new set of 10 whenever you want. New codes make the old set inactive. You cannot download codes if you are in the Advanced Protection Program.
GitHubProfile picture, Settings, Password and authentication, then Recovery codes, ViewGenerating a new set invalidates the earlier codes. Reconfiguring 2FA without disabling it does not change your recovery codes. GitHub recommends a secure password manager.
CloudflareMy Profile, Authentication, Two-Factor Authentication, Manage, Backup codes, RegenerateEach code is one-time use. Regenerating invalidates the previous codes. Cloudflare also says it will periodically remind you to save your backup codes.

Two details are worth acting on. First, if reconfiguring 2FA leaves GitHub codes unchanged, an old list can quietly outlive a change of phone, so regenerate on purpose. Second, Google's note that some accounts cannot download codes means your plan must not assume a file exists.

A worked example: three people, four accounts

This example is illustrative. The team and the accounts are made up to show the method.

Three people run a small online course. Mia builds the site, Jonas handles money and Eve writes the lessons. In a 20-minute check they list the accounts that have 2FA on.

AccountOwnerWhere the codes wereProblemFix
Domain registrarMiaA file on Mia's laptopOne copy, one personGenerate a new set, put it in the shared vault, name Jonas as backup
Code hostMiaPhoto on Mia's phoneSame phone as the authenticator appRegenerate, move to the vault, delete the photo
Payment processorJonasPrinted, in his flatNobody else knows it existsTell Eve where the copy is, record it in the list
Course platformEveNever savedNo backup codes at allGenerate and store this week

Look at what the table shows. Four accounts, four different habits, and not one of them survives its owner losing a phone. After the fix, each account has one owner, one named backup, and the codes sit in a place two people can reach. Time spent: about an hour in total. Cost: nothing.

Copy this backup code register

Keep this register where all founders can read it. It holds locations, never the codes themselves.

Backup code register: [PROJECT]   Last reviewed: [DATE]   Reviewer: [NAME]

One row per account that uses 2FA:
[ACCOUNT + WHAT IT CONTROLS]
  owner: [NAME]   backup person: [NAME]
  2FA method: [AUTHENTICATOR APP / SECURITY KEY / SMS / OTHER]
  codes stored in: [SHARED VAULT / PRINTED COPY / OTHER]   location detail: [E.G. VAULT NAME + ITEM TITLE]
  generated on: [DATE]   next review: [DATE]
  codes left: [NUMBER or UNKNOWN]
  recovery email: [ADDRESS]   controlled by: [NAME]

Open items:
[ITEM], owner [NAME], due [DATE]

Rule: never write the codes in this register.

The access audit asks the surrounding questions: who can sign in, who pays, and which recovery email is used. The user access review checklist has a version with checkboxes you can run each quarter.

What if I lose the backup codes or the phone?

Do not guess and do not try to sign in as someone else. Work through these steps in order.

  1. Try every other method first. Another registered device, a security key, a saved sign-in on a trusted computer, or a recovery phone or email if the service offers one.
  2. Check the shared place. If the codes are in a team vault or a printed copy, this is the moment it pays off.
  3. Use the service's official account recovery. Each provider has its own process, and some take days. Start early.
  4. Once you are in, rotate everything. Generate a new set of codes, check the 2FA devices and recovery email, and update your register.

If you are locked out of something the project depends on and the owner is gone, the harder case is covered in the guide on what to do when a cofounder removes you from the domain or ads. For anything with money or a legal claim, speak to a lawyer first.

Are backup codes the best option?

They are the simplest, because they need no device and no extra software. They are not the only option, and some services offer alternatives such as security keys or a recovery phone. A recovery method that depends on one person's mobile number has the same weakness as one set of codes on one laptop.

My rule is to have at least two independent ways in to each critical account, held by at least two people. Backup codes are often the easiest second way. The second domain admin guide explains why a second admin is a different kind of protection, and why you want both.

Do it with AI

Turn your account list into a backup code plan

Paste the list of accounts, not the codes, and ask an AI to find the gaps. Never paste a backup code, a password or a recovery key. Check every step against the provider's official help.

Act as an operations assistant, not a security auditor. Here is a list of the accounts our [NUMBER]-person project uses, with who owns each, where the backup codes are stored (location only, no codes) and who is the backup person: [PASTE LIST, NO CODES OR PASSWORDS]
1) Flag every account where the codes live on one device, in one person's head, or on the same phone as the authenticator app.
2) Flag accounts with no named backup person.
3) Rank the fixes: domain, money, customers and code first.
4) Suggest a safe order so nobody is locked out during the change.
5) Write the three questions I should ask each owner.
6) Mark every step where I must check the provider's official help.

Frequently asked questions

What are backup codes for 2FA?

They are a list of single-use codes a service gives you when you enable two-factor authentication. You use one to sign in when your usual method, such as an authenticator app, is not available. Once used, a code cannot be used again.

Where do I find my backup codes?

In the security settings of the account, under two-step verification or two-factor authentication. Google, GitHub and Cloudflare each list their own path in the table above. You can only see or regenerate them while signed in, which is why saving them early matters.

Do backup codes expire?

The three vendor pages I read describe codes becoming inactive after use or when a new set is generated, and none of them mentions a time limit. I did not find an expiry statement, so check your provider's page. Replace the set whenever a few remain.

What if I lose my backup codes?

If you are still signed in somewhere, generate a new set. Google, GitHub and Cloudflare say new codes replace the old ones. If you are locked out, use another registered method or the service's official account recovery.

Is it safe to store backup codes in a password manager?

GitHub recommends a secure password manager, and Cloudflare mentions one for email 2FA recovery codes. The caution is that the manager's own login must be well protected, and it must not depend on the same phone as your authenticator.

Should two cofounders share the same backup codes?

For a project account, yes: one set per account, held where two named people can reach it. Do not share your personal accounts' codes. Google's help says not to share backup codes with anyone, which applies to your own Google Account.

Do I need to regenerate codes when someone leaves?

If they could read the codes, I would. A fresh set makes the old one inactive on the services above, so a copy in a former teammate's files stops working. Do it alongside removing their access.

What this guide does not cover

Sources

Related

Record who holds the backup codes for each account, and who the backup person is.

Start free in the app