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.

100% Client-Side — Your data never leaves your browser
Live TOTP Code
Refreshes in 30s · SHA-1 · 6 digits · 30s period
QR Code — Scan with Authenticator App
Loading QR...
Scan with Google Authenticator, Authy, or any RFC 6238 compatible app
otpauth:// URI
otpauth://totp/MyApp%3Auser%40example.com?secret=EKF5E2E6VD47T3527BGY&issuer=MyApp&algorithm=SHA1&digits=6&period=30

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.

Related Tools