2FA Code Generator › Guides › Google / Gmail 2FA

Google 2-Step Verification: Get Your Gmail 2FA Code

By Md Rasel Mahamud · Last updated:

Reviewed for accuracy by the 2FA team

Your Google Account protects Gmail, YouTube, Google Drive and often the password resets of other services. Turning on 2-Step Verification is one of the most valuable security steps you can take. This guide covers setup, authenticator codes and backup codes.

Published 30 November 2026

How to turn on Google 2-Step…Add an authenticator for your…Google backup codesGet your Gmail 2FA code in the…Google code not accepted?FAQ

How to turn on Google 2-Step Verification

According to Google's help centre, on a computer:

  1. Open your Google Account at myaccount.google.com.
  2. Click Security & sign-in.
  3. Under How you sign in to Google, select Turn on 2-Step Verification.
  4. Follow the on-screen steps.

Menu names can change over time. If a step looks different, search the service's official help pages for "two-factor authentication".

Add an authenticator for your Google 2-Step Verification code

  1. Go to the authenticator page of your 2-Step Verification settings (myaccount.google.com/two-step-verification/authenticator).
  2. Click Set up authenticator (on some devices it may say "Get started").
  3. Google shows a QR code. If you want to use the key on a computer, look for the option to enter or show the key as text instead of scanning, and copy it.
  4. Add the key to your authenticator, or paste it into the online 2FA code generator.
  5. Enter the 6-digit code to confirm.

Google Authenticator is Google's own app, but Google accounts accept codes from any standard TOTP authenticator, so the key also works in our 2FA code generator. We are not affiliated with Google.

Google backup codes

Google backup codes are 8-digit codes you can use when you do not have your phone or authenticator. Google gives them in sets of 10, and each code becomes inactive after you use it.

  1. Go to myaccount.google.com and click Security & sign-in.
  2. Under How you sign in to Google, click 2-Step Verification (sign in if asked).
  3. Under Backup codes, click Continue, then get, download or print your codes.

If you create a new set, the old set stops working. Keep the codes offline, away from the phone you use for codes.

Get your Gmail 2FA code in the browser

  1. Open the 2FA code generator in a new tab.
  2. Paste the Google key into the box, or click Scan QR or the upload button to read the QR code.
  3. Your 6-digit Google 2FA code appears instantly, with a countdown to the next code.
  4. Copy the code and enter it in Google before the timer runs out.

Gmail login codes from the authenticator and Google backup codes are different. Backup codes are 8 digits and single-use; authenticator codes are 6 digits and change every 30 seconds.

Google code not accepted?

Check that your device clock is set automatically, use the newest key if you set up the authenticator more than once, and enter the code before the countdown ends. See 2FA code not working for a full checklist.

Frequently asked questions

How do I get a Gmail 2FA code?
After you add an authenticator in Google 2-Step Verification, open that authenticator or paste the same key into our 2FA code generator to see the current 6-digit Google code.
How many Google backup codes do I get?
Google gives you a set of 10 backup codes. Each is 8 digits long and works only once. You can create a new set at any time, which deactivates the old one.
Can I use Google Authenticator on a PC?
Google Authenticator is a phone app, but any TOTP authenticator, including a browser tool such as our 2FA code generator, can create the same codes on a PC from your key.
Is 2-Step Verification the same as 2FA?
Yes, for practical purposes. 2-Step Verification is Google's name for adding a second step, such as an authenticator code, after your password.

Ready to get your 2FA code?

Paste your secret key or scan a QR code – free, private and instant.

Open the 2FA Code Generator