TOTP Code Generator
Generate Time-based One-Time Passwords (RFC 6238) compatible with Google Authenticator, Authy, and any 2FA app.
Enter a valid secret to generate QR code
About TOTP (Time-based One-Time Password)
What is TOTP?
TOTP (RFC 6238) is a two-factor authentication algorithm that generates a one-time password from a shared secret key and the current time. The code changes every 30 or 60 seconds and is used as a second factor alongside your password.
How does it work?
TOTP computes HMAC-SHA1 of the current time slot (floor(unix_time / period)) using your secret key, then extracts a 6 or 8 digit number through dynamic truncation. Both your app and the server compute the same code independently.
How to use this tool
- Click Generate to create a random secret key
- Enter your app name and account email
- Scan the QR code with your authenticator app
- The live 6-digit code updates every 30 seconds
Security note
All computations happen entirely in your browser. No secret keys or codes are ever sent to any server. Keep your secret key safe — anyone with it can generate valid codes.
Compatible Authenticator Apps
Frequently Asked Questions
Is this tool safe to use for real accounts?
This tool is intended for testing and development. For real accounts, generate secrets using your service's official setup flow.
Why does my code not match my authenticator app?
Make sure your system clock is accurate — TOTP relies on synchronized time. Also verify the secret, period, and digit count match.
What is the Base32 format?
Base32 uses characters A-Z and 2-7. It's the standard encoding for TOTP secrets. Invalid characters like 0, 1, 8, 9 are not allowed.