Free tool

2FA Code Generator.

Paste your 2FA secret key and get your 6-digit login code instantly, just like Google Authenticator. Everything runs in your browser. Your key is never sent anywhere.

Paste the key exactly as you saved it. Spaces are fine. Your key never leaves this browser.

Current code
--- ---
Next code: --- ---
30s

Why 2FA keeps your email safe

Your email is the key to everything else. Whoever controls it can reset the passwords of your YouTube, TikTok and other accounts. Two-factor authentication (2FA) adds a second lock: even if someone learns your password, they still need a 6-digit code that changes every 30 seconds.

  • Stops password theft. A leaked or guessed password alone is no longer enough to log in.
  • Blocks phishing. Fake login pages cannot reuse a code after it expires.
  • Protects every linked account. A secure email means your channels and profiles stay yours.
  • Better than SMS codes. Authenticator codes cannot be stolen with a SIM swap.

How to turn on 2FA for Gmail

  1. Go to your Google Account and open Security.
  2. Turn on 2-Step Verification and follow the steps.
  3. Under Authenticator, choose to set up an authenticator app.
  4. Click "Can't scan it?" to see the secret key, and save it somewhere safe.
  5. Paste the key into this tool, enter the code it shows, and confirm.

Keep your secret key safe

  • Store it in a password manager or written down offline, never in a public note or chat.
  • Never share it with anyone. Anyone with the key can create your codes.
  • Save your Google backup codes too, in case you lose access to your key.

Frequently asked questions

What is a 2FA secret key?

It is the code a website shows you when you turn on two-factor authentication with an authenticator app, usually under the QR code. It looks like JBSWY3DPEHPK3PXP. Anyone with this key can create your login codes, so keep it private.

Is it safe to use this tool?

The codes are calculated by your own browser with built-in encryption. Your secret key is not sent to our server or saved anywhere. Close the page and nothing is left behind.

Why is my code not working?

Check that your device clock is set automatically, because codes depend on the exact time. Also make sure you copied the full key with no missing characters, and type the code before the timer runs out.

Does it work with Gmail, YouTube, TikTok and other sites?

Yes. It works with any site that uses standard authenticator app codes (TOTP), including Google, YouTube, TikTok, Instagram, Facebook, X and most others.

Is this the same as Google Authenticator?

It creates the same 6-digit codes from the same key. An authenticator app on your phone is still the best everyday option. This tool is handy as a backup, or when you are on a computer.

More free tools for creators

YouTube Money Calculator →What your views could earnYouTube Monetization Checker →How close you are to the Partner ProgramTikTok Money Calculator →Creator Rewards earnings by countryTikTok Monetization Checker →Do you qualify for Creator Rewards?YouTube Banner Size Checker →See how your banner crops on every deviceUsername Generator →Channel names and handles in seconds
See all free tools →