Type a tool name, for example "keyword density" or "transcript".
Generate live TOTP 2FA codes from a secret key. Runs entirely in your browser.
Enter the Base32 secret from your authenticator app setup page.
Current TOTP Code
------
30
seconds left
Previous Code
------
Next Code
------
Add to Authenticator App
OTP Auth URI
A TOTP 2FA code generator turns the Base32 secret from a two-factor setup page into the same rotating 6 or 8 digit code an authenticator app shows. Paste your secret, choose a 30 or 60 second period, and get the current, previous and next codes with a live countdown. It is free and needs no sign-in.
A TOTP code is a one-time password that changes on a fixed schedule and is calculated from a shared secret and the current time. TOTP stands for Time-based One-Time Password and is defined in RFC 6238, which builds on the HOTP method in RFC 4226.
When you turn on two-factor authentication with an authenticator app, the service gives you a secret key, usually as a QR code or as a text string in Base32. Your app and the service's server both store that secret. Every 30 seconds, both sides divide the current time by the period to get a counter. They run that counter through an HMAC (SHA-1 is the standard default) and shorten the result to 6 digits. If both calculations match, the login is accepted.
Because the code depends on the clock, nothing is sent between you and the service except the digits you type. A stolen code is useless after its window ends.
Base32 uses only the capital letters A to Z and the digits 2 to 7. There is no 0, 1, 8 or 9. A typical secret looks like JBSWY3DPEHPK3PXP. Many services show it in groups of four characters with spaces, and the tool ignores spaces and lowercase letters when you paste it.
You need only a Base32 secret and about ten seconds. Follow these steps:
If you change any field after generating, the results clear. Click Generate Live Code again to refresh them.
Say a practice setup page gives you the secret JBSWY3DPEHPK3PXP. Enter it, keep 30 seconds and 6 digits, and click Generate Live Code.
The tool shows a code split into two groups of three, such as 482 915. The exact digits depend on the clock, so your screen will differ. Say the countdown reads 19. That means the code stays valid for 19 more seconds. The Previous Code is the one that was valid in the last 30-second window, and the Next Code is what you will see when the timer hits zero.
Now switch Digits to 8. The tool needs a new click on Generate Live Code, and it returns an 8 digit code for the same secret. This is a different number, not a longer version of the 6 digit one. The service you log in to must expect 8 digits, or the code will be rejected.
For the URI, type [email protected] as the Account Name and Acme as the Issuer. The OTP Auth URI field then fills with an address starting with otpauth://totp/Acme:, followed by your account, the secret, the issuer, SHA1, the digit count and the period. If you leave both fields empty, the tool uses [email protected] and MyApp as placeholders.
Each part of the output answers one question, and the countdown matters most.
An error such as Invalid Base32 character means the secret contains a character outside A to Z and 2 to 7, often a zero typed instead of the letter O, or a one instead of the letter I. Invalid Base32 padding or Invalid Base32 padding bits usually means the secret was cut off or has extra characters at the end. A message asking for a valid Base32 secret means the field is empty, malformed or longer than 1024 characters.
Most services show the secret during two-factor setup, right under the QR code. Look for a link or label such as "Can't scan the QR code?", "Enter a setup key" or "Manual entry". Searchers often ask how to get an authenticator code for Facebook. The steps are the same everywhere: open the account's security settings, choose the authentication app method, and copy the setup key shown next to the QR code.
The secret appears only during setup on many services. If you did not save it, you cannot read it back later. You would have to turn off two-factor authentication and set it up again, or use a recovery code to get in.
The tool fits anyone who needs to see how a time-based code behaves or produce one from a secret they already hold.
For related work, the bcrypt hash generator covers password storage, and the MD5 generator shows how hash functions turn input into fixed output. You can find more in the security and encryption tools collection.
Most failed codes come from a handful of causes, and each has a quick fix.
Two-factor codes protect logins, but they are one layer. If you run a website, a strong content security policy also helps reduce the risk of script injection on the pages where people sign in.
This tool follows the standard TOTP method with the SHA-1 algorithm, 30 or 60 second periods and 6 or 8 digit codes. Services that use other algorithms, other periods or different code formats will not match. Some apps, such as those that show alphanumeric codes, use their own schemes that are not standard TOTP.
The codes depend on the clock of the device you use. The tool cannot fix a wrong system clock, and it cannot recover a secret you lost. It also does not scan QR codes: you need the text secret, not the image.
Use this TOTP 2FA code generator whenever you need a quick, standard code from a Base32 secret. Enter your secret above, set the period and digits to match your service, and click Generate Live Code to see your current, previous and next codes.
Your report has been submitted. We will look into this issue.
A VPN changes your network exit. It does not guarantee anonymity.
Themes, plugins, code, video, audio, graphics & more from 90,000+ authors.
Web Development
Design & Media
Unlimited Access
Explore Envato Market