TOTP Code Generator
Time-based one-time codes from a secret
All processing happens locally in your browser. Your data is never uploaded to a server.
Time-based one-time codes from a secret
All processing happens locally in your browser. Your data is never uploaded to a server.
—
| Time counter T | — |
|---|---|
| Current Unix time | — |
| otpauth:// URI | otpauth://totp/Example?secret=JBSWY3DPEHPK3PXP&algorithm=SHA1&digits=6&period=30 |
TOTP (RFC 6238) is HOTP with a clock for a counter: T = floor(unix seconds / period), HMAC the 8-byte big-endian T with the secret, then dynamically truncate 4 bytes and take the last N decimal digits. Any correct implementation yields the same code for the same secret and window, which is why it verifies offline.