OTP/TOTP Generator
Generate TOTP Code
About the Otp Code Generator
TOTP (Time-based One-Time Password) is the algorithm behind Google Authenticator, Authy, and most 2FA apps. It generates a 6-digit code every 30 seconds from a shared secret — no network connection needed.
Enter a TOTP secret to generate the current 6-digit code, with a countdown to the next refresh. Useful for testing 2FA flows, verifying authenticator setup, or as a backup when your phone is unavailable. All computation is local.
How to use
- Paste your TOTP secret (base32 encoded).
- The current 6-digit code appears with a countdown.
- Use the code in your 2FA verification.
- The code refreshes automatically every 30 seconds.
Frequently Asked Questions
Is this safe to use for real 2FA? ▾
The tool computes TOTP codes locally using the same algorithm as Google Authenticator. Your secret never leaves your browser. Use it for testing or as a backup — your phone is still your primary authenticator.
Why does the code change every 30 seconds? ▾
TOTP divides the current Unix timestamp by 30 to get a time step. Each time step produces a different code. The countdown shows how long until the next step.