TOTP Authenticator Code Generator
Generate time-based one-time passwords (TOTP, RFC 6238) from a base32 secret, just like an authenticator app. Choose SHA-1, SHA-256 or SHA-512, 6, 7 or 8 digits and a 15, 30 or 60-second period, and see the current code with a live countdown next to the previous and next codes. Everything is computed in your browser with the Web Crypto API, so the secret is never uploaded.
How to use
- Replace the sample secret in Secret (base32) with your own; the field is masked, and the eye button shows or hides it.
- Set Algorithm, Digits and Period to match your provider; the defaults SHA-1, 6 and 30 s suit most services.
- Read the Current code and the Refreshes in countdown; the code changes automatically when the period ends.
- Click Copy to copy the current code, or compare it with Previous code and Next code to check for clock drift.
Example
Input
Secret (base32): GEZDGNBVGY3TQOJQGEZDGNBVGY3TQOJQ (the ASCII text 12345678901234567890 from RFC 6238)
Algorithm: SHA-1 · Digits: 8 · Period: 30 s
Clock: Unix time 1234567890 (2009-02-13 23:31:30 UTC)Output
Current code: 8900 5924 (copied as 89005924)
Refreshes in 30 s
Previous code: 3998 0357
Next code: 3859 0587
The tool always uses your device's current time, so the code you see changes every period; 89005924 is the RFC 6238 test value for this moment.Frequently asked questions
Which authenticator apps is it compatible with?
The defaults (SHA-1, 6 digits, 30 seconds) match Google Authenticator, Authy, 1Password and standard otpauth:// setups. Change the algorithm, digits or period only if your provider specifies different values.
Is my secret sent anywhere?
No. Base32 decoding and the HMAC are computed locally with your browser's Web Crypto API, and the page does not send the secret over the network.
What happens to spaces, lowercase letters or other characters?
Spaces and trailing = padding are removed and letters are converted to uppercase, so a secret written as jbsw y3dp ehpk 3pxp works. Any other character outside A–Z and 2–7 (for example 0, 1, 8 or a hyphen) is silently dropped instead of being reported, so double-check the secret if the codes are not what you expect.
Why does a service reject my code?
TOTP depends on the clock. If the code your app shows matches Previous code or Next code here instead of Current code, one of the two clocks is off by about one period; sync your system time.