TOTP Generator — Free Online Time-Based OTP Code Generator
Generate TOTP 2FA codes and QR codes compatible with Google Authenticator, Authy, and all RFC 6238 apps — 100% client-side.
Frequently Asked Questions
How TOTP Two-Factor Authentication Works
TOTP (Time-Based One-Time Password, RFC 6238) is the algorithm powering the 6-digit codes in authenticator apps like Google Authenticator, Authy, and Microsoft Authenticator. It derives a short-lived code from a shared secret and the current time, making it a strong second factor for authentication.
The setup flow works as follows: your server generates a random Base32-encoded secret and shares it with the user by encoding it into a QR code. The user scans this QR code with their authenticator app, which stores the secret. On login, both sides independently compute HMAC-SHA1(secret, floor(time/30)) and the user enters the resulting 6-digit code.
This tool lets you generate test secrets, preview QR codes, and see live codes for development and testing purposes. Never use test secrets in production — generate and store secrets server-side, transmit them only over HTTPS, and never log them.