TOTP Generator
Generate the current TOTP code from a Base32 secret.
This tool needs JavaScript enabled to run in your browser.
What this tool does
This tool generates the current time-based one-time password (TOTP) from a Base32 secret, the same six-digit code an authenticator app shows. It updates every second and tells you when the current code expires.
How TOTP works
TOTP combines a shared secret with the current time, rounded to a period (usually 30 seconds), to produce a code that both sides can compute without talking to each other. Because it is derived from the clock, the code changes on a fixed schedule and an old code stops working.
A note on secrets
The secret is the key to the account's second factor. Generate codes here only for testing or for a secret you control, and prefer a dedicated authenticator app for real accounts. Everything is computed in your browser; the secret is never uploaded or stored.
Common use cases
- Testing a login flow that expects a TOTP code.
- Checking that a secret produces the expected codes.
- Generating a code for an account you administer.
Frequently asked questions
- Is my secret safe?
- Codes are generated in your browser from the secret you enter. Nothing is uploaded or stored. Use a dedicated authenticator app for real accounts.
- Why does the code keep changing?
- TOTP is derived from the current time in fixed periods, so a new code appears every period and old codes stop working.
Learning resources
Testsmith also runs hands-on courses and a free practice app for the skills behind this tool.