About TOTP Code Generator
Generate the same six-digit time-based codes that an authenticator app shows. Paste the Base32 secret key (or the otpauth:// link) you were given when setting up two-factor authentication and the current code appears, with a countdown to the next one. It is useful for testing a login you are building, or for checking that a secret was saved correctly. The calculation happens in your browser and the secret is never sent anywhere.
How to use TOTP Code Generator
- Paste the secret key into the box. Spaces and dashes are ignored. An otpauth:// link also works and fills in the digits, period and algorithm for you.
- Leave Digits at 6, Period at 30 and Algorithm at SHA-1 unless the service told you otherwise. These are what almost every service uses.
- Read the current code and type it into the service before the countdown ends.
- Press Copy code to copy it, or wait a moment for the next code, which is also shown.
Tips and good to know
- Your computer clock must be correct. Codes are based on the time, so a clock that is off by more than about 30 seconds gives codes that are rejected.
- Secrets use only the letters A to Z and the digits 2 to 7. If you see 0, 1, 8 or 9 it is not a Base32 secret.
- Treat the secret like a password. Anyone who has it can make your codes. For real accounts, a dedicated authenticator app or a hardware key is safer than a web page.
- The tool follows RFC 6238 and is checked against the official test values.
- The secret is hidden by default. Press Show to check what you pasted.
Frequently asked questions
Is my secret sent to a server?
No. The code is calculated in your browser with the built-in Web Crypto features, and nothing is uploaded or stored.
Why does my code not work?
The usual causes are a wrong clock, a mistyped secret, or a service that uses a non-standard number of digits, period or algorithm. Check each of these.
Where do I find the secret?
When you turn on two-factor authentication, most services show a QR code and, under it, a text key such as Can't scan?. That text is the secret.
What does Period mean?
How many seconds each code lasts. The standard is 30.
Can I replace my authenticator app with this?
It is meant for testing and learning. A phone app keeps your secrets stored safely, which this page deliberately does not.
Is TOTP Code Generator free?
Yes. TOTP Code Generator is 100% free: no sign-up, no paid plan, no trial and no limit on how often you use it. It runs in your browser, and ToolzAura is paid for by ads, so every tool stays free.
Are my files uploaded?
No. This tool runs in your browser, so your input stays on your device.