TOTP Authenticator Code Generator

Generate time-based one-time passcodes (RFC 6238) from a Base32 secret, with a live countdown and code verification. Runs locally with Web Crypto.

Generate code

Current code
Verify
Error

How it works

About TOTP

TOTP (Time-based One-Time Password) is a one-time password derived from a shared secret and the current time, standardized in RFC 6238. It is built on the same HMAC-SHA1 construction as HOTP (RFC 4226), but instead of a moving event counter it uses a 30-second time step as the moving factor, so each code is valid only for that window. The code is the low 6 digits of a dynamically truncated HMAC-SHA1 over the time-step counter — change the secret or the time, and the code changes completely.

Use TOTP for two-factor authentication (2FA) — authenticator apps such as Google Authenticator, 1Password, and Authy all speak TOTP — and for any service where a shared secret can be provisioned safely, including password-manager accounts. Because the code depends on time, the device must keep its clock synchronized: if codes keep failing, check the system time before suspecting the secret. The Base32 secret is the root of trust: provision it over a trusted channel, back it up securely (for example, as a recovery code), and treat it like a password — anyone who obtains it can generate every future code. Real-world verifiers often accept ±1 step to absorb clock drift; this page checks only the current step.