TOTP and HOTP codes
Show live TOTP two-factor codes, or HOTP codes for a counter, from a Base32 secret, with SHA-1, SHA-256 or SHA-512 and 6 to 8 digits.
Current code
Time: (device clock)
About this tool
TOTP (RFC 6238) is the algorithm behind authenticator apps. The app and the server share a secret, and every 30 seconds both compute an HMAC of the current time step and turn it into a short code.
Paste a Base32 secret to see the current code and a countdown to the next one. Most services use SHA-1, 6 digits and a 30-second period, and all three can be changed. HOTP (RFC 4226), the counter-based original that hardware tokens use, is here too: enter a counter to see its code and the next four.
Questions
- Where do I find the secret?
- It is the Base32 text shown when you set up two-factor authentication, often as “enter this key manually”. In an otpauth:// link it is the secret parameter.
- Why doesn’t my code match?
- Check that the hash, digits and period match what the service uses. Codes depend on the time, so this page reads the current time from bitanon.dev instead of trusting your device clock, and says if your device is off. If your authenticator app’s codes are wrong, its device clock is probably off.
- Is my input sent to a server?
- No. The page loads a compiled Dart engine into a Web Worker and does all the work in your browser tab. Nothing you type or drop in is uploaded, and the tools keep working offline once the page has loaded.