Code2FA
EN
EnglishTiếng Việt中文РусскийEspañol

What is a 2FA secret key? Where to find it and how to manage many

Code2FA team · Updated · 2 min read

What is a 2FA secret key? Where to find it and how to manage many

The 6-digit code keeps changing, but what really matters is the secret key behind it. Whoever has the key can generate your codes forever.

What a secret key looks like

A secret key (setup key, "2FA key") is a string of capital letters and digits, usually 16 or 32 characters, such as JBSWY3DPEHPK3PXP. It uses Base32: A–Z and 2–7, so it never contains 0, 1, 8 or 9. Some sites split it into groups of four; spaces don't matter.

The QR code you scan when enabling 2FA actually contains a link like:

otpauth://totp/Facebook:you@email.com?secret=JBSWY3DPEHPK3PXP&issuer=Facebook

The secret= part is the key. You may also see digits, period or algorithm if the service uses non-default settings.

Where to find your secret key

  • During setup: under the QR code there's almost always a "Can't scan it?", "Enter a setup key" or "Enter code manually" link that reveals the key.
  • After setup: most services won't show the old key again. To get one you have to change your authenticator app or turn 2FA off and on (which issues a new key).
  • From Google Authenticator: use Transfer accounts → Export to create a QR, then scan it with Code2FA. Code2FA reads out each account's key and name.
  • From a QR screenshot: in Code2FA choose Scan QR → pick an image.

What is the ID|Pass|2FA format?

People who manage many accounts (stores, ad accounts, agencies) often keep one account per line, like username|password|JBSWY3DPEHPK3PXP. The last field is the secret key. Paste the whole list into Code2FA: it detects the key column, shows a code for every line, and has a Copy all button.

Protect the key like a password

  • A key never expires. Whoever has it can generate valid codes until you change it.
  • Don't send keys over chat or paste them into unknown sites. Code2FA computes codes in your browser and never uploads keys, but only use tools you trust.
  • When you take over an account from someone else (a former employee, a partner), change the authenticator to get a new key. The old key is still on their device.
  • Store keys encrypted: a password manager, a password-protected backup file, or Code2FA's vault (AES-256-GCM, stored on your device).

Managing dozens or hundreds of accounts

  1. Name every entry clearly (service + email or username) so you never copy the wrong code.
  2. Keep keys in one encrypted vault with at least two backups in different places.
  3. Password managers with TOTP support (Bitwarden, 1Password…) can fill both password and code.
  4. Need codes in bulk on a computer? Paste the list into Code2FA. Need them on your phone? Export from Code2FA to Google Authenticator via QR (10 accounts per QR) or an Aegis file.

FAQ

How long is a 2FA secret key?

Usually 16 or 32 Base32 characters (A–Z, 2–7). Some sites show it in groups of four; spaces don't matter.

How can I see the secret key for an account that already has 2FA?

Most services won't show it again. You can export a QR from Google Authenticator and read it with Code2FA, or change the authenticator app on the service to get a new key.

Related articles