To generate and save Google backup codes, open your Google Account’s 2-Step Verification settings, select Backup codes > Continue > Get backup codes, then choose Download Codes or Print codes. You need to turn on 2-Step Verification before generating codes.
You can reach these settings through a browser, Android settings, or Gmail on an iPhone or iPad. Sign in only through Google’s own app or website, and never share a code, password, or remote access with someone who contacts you.
The short version
- Before you start: Enable 2-Step Verification for your Google Account.
- Generate your codes: Open Backup codes, select Continue, then select Get backup codes.
- Save a copy: Choose Download Codes for a text file or Print codes for a paper copy.
- Replace carefully: Generating a replacement set invalidates your previous codes.
| Task or route | Where it applies | Requirement or result |
|---|---|---|
| Enable verification | Google Accounts without 2-Step Verification | Complete the account setup prompts; organizational restrictions may apply |
| Generate in a browser | Computer and mobile browsers | Requires 2-Step Verification |
| Generate on Android | Phones and tablets with Google Account settings | Start in Settings > Google |
| Generate on iPhone or iPad | Gmail on iPhone and iPad | Start in Menu > Settings |
| Enter through a profile menu | Google apps and websites showing account management | Opens Google Account settings |
| Download a copy | Computer, Android, iPhone and iPad | Saves a text file; unavailable with Advanced Protection |
| Print a copy | Computer, Android, iPhone and iPad | Requires printing to be available |
| Generate a replacement set | The Backup codes screen | Invalidates the previous set |
| Find a downloaded copy | The device where you downloaded codes | Search for Backup-codes-username.txt |
| Revoke existing codes | The Backup codes screen | Invalidates the existing set |
| Have an administrator generate codes | Managed Google Workspace accounts | Requires enabled or enforced verification and administrator privileges |
| Recover under a security key policy | Workspace accounts under Only security key | Requires an administrator and a recovery grace period |
| Generate through the administrative API | Authorized integrations for managed accounts | Uses verificationCodes.generate |
| Retrieve codes through the administrative API | Authorized integrations for managed accounts | Uses verificationCodes.list |
| Enter through the product page | Google Account web service | Opens account settings |
Turn on verification before generating codes
Open your Google Account at myaccount.google.com and select Security & sign-in. Under How you sign in to Google, select Turn on 2-Step Verification. Complete the setup prompts for your account before continuing to backup codes.
If 2-Step Verification is already enabled, continue with the route that matches your device. Organizational restrictions may affect setup for a managed account; if you need administrator assistance, follow the Workspace steps below.
Generate Google backup codes in a browser
On a computer or in a mobile browser, open your Google Account at myaccount.google.com and select Security & sign-in. Under How you sign in to Google, select 2-Step Verification. Authenticate if requested.
Select Backup codes, then select Continue and Get backup codes. Save the generated codes using Download Codes or, when printing is available, Print codes.
Generate codes through Android settings
On an Android phone or tablet with Google Account settings, open Settings > Google, then select Manage your Google Account. Open Security & sign-in and find How you sign in to Google. Select 2-Step Verification to reach the verification settings.
Open Backup codes, select Continue, then select Get backup codes. You can then download the codes or print them when printing is available.
Generate codes on an iPhone or iPad
In Gmail on your iPhone or iPad, open Menu > Settings. Select your account name, then select Your info, privacy and security. Open Security & sign-in to continue.
Under How you sign in to Google, select 2-Step Verification > Backup codes. Select Continue, then select Get backup codes. You can also use the browser route on your iPhone or iPad.
Download or print your backup codes
From the Backup codes screen, select Download Codes to save a text file. You can download codes on a computer, Android device, iPhone, or iPad. Downloading backup codes is unavailable for Advanced Protection participants.
For a paper copy, select Print codes on the same screen. You can print from those devices when printing is available. Store the printout securely.
Find a copy you already downloaded
If you previously downloaded your codes, search that device for Backup-codes-username.txt, replacing username with your username. This applies to saved copies on a computer, Android phone or tablet, iPhone, or iPad.
If you generated a replacement set after saving that file, its codes are no longer valid. Use the saved copy of your replacement set instead.
Replace your backup codes and save the new set
Generating a replacement set invalidates your previous backup codes. Open the Backup codes screen through the route for your device, then select Refresh. Save the replacement set using Download Codes or, when printing is available, Print codes.
Get administrator help for a Workspace account
For a managed Google Workspace account with verification enabled or enforced, ask your administrator to generate backup codes. The administrator needs the User management privilege. Generating codes for another administrator requires a super administrator.
If you are the administrator, open the Google Admin console, then open Menu > Directory > Users and select the user. Open Security > 2-step verification, then select Get Backup Verification Codes. Copy a code and provide it to the account owner.
If your organization enforces Only security key, you cannot generate your own backup codes. Ask your administrator to configure a recovery grace period and generate a backup code through the Admin console route above. Administrator-generated codes work during that grace period.
Generate and retrieve codes through the administrative API
If you manage an authorized integration for managed accounts, you can use the Admin SDK Directory API v1. This route requires administrative authorization and the API’s user security OAuth scope. It applies to managed accounts rather than personal Gmail self-service.
Send an authorized POST request with an empty body using verificationCodes.generate for the target user. Retrieve the resulting codes using verificationCodes.list, which takes an authorized GET request with an empty body and the same OAuth scope.
Save the returned items[].verificationCode values securely. The retrieval response excludes used or invalidated codes.
Frequently Asked Questions
Do you need to install an app to generate Google backup codes?
No separate software installation is required to generate or download backup codes. You can access the web settings from Google’s account page by selecting Go to Google Account.
Can you open backup code settings from your Google profile picture?
Yes, on Google apps and websites that display the account management option, select your profile picture, then select Manage your Google Account. Open Security & sign-in, find How you sign in to Google, then select 2-Step Verification > Backup codes.
How do you revoke your existing backup codes?
Deleting your backup codes invalidates the existing set. To revoke them, open the Backup codes screen and select Delete.
Do these steps require a particular Android or Gmail version?
Google specifies no minimum Android version for the Android route and no Gmail or operating system version for the iPhone and iPad route. On Android, the steps apply to phones and tablets with Google Account settings; on iPhone and iPad, they apply to the current Gmail app.











