2FA Code Generator: Codes Not Accepted and Where to Find Your Key

What is it?

The 2FA Code Generator makes the same time-based codes as Google Authenticator, from your account’s secret key.

Who is it for?

People who saved their 2FA setup key and need a code when their phone isn’t available, developers testing two-step sign-in, and IT staff helping users set up authenticators.

How to use it

  1. Paste the secret key or otpauth:// link.
  2. Read the 6-digit code and type it before the countdown ends.
  3. Tap Copy code if you prefer to paste it.

Where is my secret key?

When you turn on 2FA, the site shows a QR code. Under it there is usually a link like Can’t scan it? or Enter a setup key. That shows the key: letters and digits such as JBSW Y3DP EHPK 3PXP. Some password managers can also show an otpauth:// link, which you can paste as it is.

The code is not accepted

  • Check the clock: codes depend on the exact time. Turn on automatic date, time and time zone on your device.
  • Type the code before the timer runs out; a new one comes every 30 seconds.
  • Make sure the key belongs to that account; each account has its own.

Keep it safe

The key never leaves this page and is not saved. Anyone with your key can make your codes, so store it like a password and use a phone authenticator app for everyday sign-ins.

Example

A site shows the setup key JBSW Y3DP EHPK 3PXP. Paste it, and a 6-digit code like 482 913 appears with a countdown. Type it on the site before the countdown ends.

Moving to a new phone

Before resetting or selling your old phone, move your accounts in your authenticator app (Google Authenticator has Transfer accounts). Keep the setup keys or backup codes in a safe place; they are the only way back in if a phone is lost.

Common questions

  • 8-digit codes? Paste the full otpauth:// link, which includes the number of digits.
  • SMS codes? This tool is only for authenticator-app (TOTP) codes, not SMS or email codes.

Tool: 2FA Code Generator

Still stuck?

Contact support. Tell us which tool or page you were using, what you tapped, what you saw, and your phone or computer and browser (for example: Android phone, Chrome). We reply by email.

Questions, or an error not listed here?

Tell us in the comments: what you were doing, the exact message you saw, and your device and browser. We read every comment and add new fixes to this article.