How do I use the TOTP generator?
Paste a base32 secret key and the current 6-digit code appears instantly, with the next code and a countdown showing how many seconds it stays valid. Choose a 30 or 60 second period and 6 or 8 digits to match your service. The default key is the public RFC test secret — at Unix time 59 seconds it produces 287082, the official test value, so you can verify the tool yourself.
What is TOTP?
TOTP (Time-based One-Time Password, RFC 6238) is the algorithm behind authenticator apps like Google Authenticator and Authy. Instead of sending codes by SMS, your device and the server independently compute the same short code from a shared secret and the current time. The code changes every 30 seconds, so a stolen code quickly becomes useless. It builds on HOTP (RFC 4226), which uses a counter instead of time.
How does the algorithm work?
The secret key is decoded from base32, then combined with the current time step (Unix time divided by the period) using HMAC-SHA1. A few bytes of the hash are selected by dynamic truncation and reduced to 6 or 8 digits. Because both sides run the same math on the same secret and time, they get the same code without communicating. This tool implements the standard exactly — it passes the RFC test vectors.
What is the secret key format?
Secret keys are base32 text: capital letters A-Z and digits 2-7, often shown in groups of 4 with spaces. When you enable 2FA, services show the secret as a QR code (an otpauth:// link) and sometimes as text for manual entry. Spaces and hyphens in the key are ignored here, and lowercase is accepted.
Is it safe to paste my secret here?
This generator runs entirely in your browser — the secret is never uploaded, stored or logged, and the page works offline once loaded. That said, a TOTP secret is as sensitive as a password: anyone who has it can generate your codes forever. Use this tool for testing and learning, prefer your authenticator app for daily logins, and never paste real secrets into websites you do not trust.
Is it free and private?
Yes. The TOTP generator is completely free, needs no sign-up, and runs entirely in your browser. Nothing is uploaded to a server. It works on phones, tablets and desktop computers.