Secret
Runs in your browser· your secret is used in this tab only: not sent, not stored, not in the URL
Enter a secret to see the current code.
A TOTP code generator that runs in your browser
Test a two-factor login without reaching for your phone. Paste a Base32 secret or an otpauth link and get the live six-digit code with a countdown, plus the previous and next codes for clock drift. Choose SHA-1, SHA-256 or SHA-512, 6 to 8 digits and a 15 to 120 second period, or generate a random test secret. The code is computed with the Web Crypto API in this tab; the secret is never sent or stored.
Frequently Asked Questions
- How do I generate a TOTP code from a secret?
- Paste the Base32 secret (or the whole otpauth:// link) into the box. The current code appears with a countdown and refreshes by itself every period. Spaces, hyphens and lowercase are accepted. Pick the algorithm, digits and period your service uses; the defaults, SHA-1, 6 digits and 30 seconds, are what most apps use.
- Is it safe to paste my secret here?
- The secret is used only inside this browser tab. It is not sent anywhere, not put in the URL, and not saved in cookies or browser storage, and a reload clears it. That is how the page is built, and you can confirm it in your browser's Network tab. Even so, keep real production secrets off shared or untrusted computers, and prefer test accounts for anything you paste online.
- How does TOTP work?
- TOTP (RFC 6238) takes the shared secret and the current time, split into periods of usually 30 seconds, and runs them through an HMAC (RFC 4226). A few digits of the result are the code. Your app and the server both know the secret and the time, so they get the same code without talking to each other.
- Why does my code not match the service?
- The usual cause is a wrong clock: the code follows this device's time, so a clock that is off by more than a period gives a different code. Check that the algorithm, digits and period match the service too. The previous and next codes shown under the current one help when the clocks differ by one period.
Related Tools
Found this useful? Hexabench is free and ad-free. If it saved you time, you can support it.
Buy me a coffee →