Generators & QR
TOTP Generator - Generate time-based one-time passwords for 2FA
Generate time-based one-time passwords for 2FA
Formulas and edge cases are reviewed against authoritative references before publication. For methodology, editorial standards, or corrections, use the links below.
Frequently asked questions
What is TOTP?
Time-based One-Time Password - generates codes that change every 30 seconds for 2FA.
Is the secret safe here?
Calculations are client-side only. Never share your secret key publicly.
Why do codes change every 30s?
Short validity windows limit the time attackers have if a code is intercepted.
Related tools
About this tool
Inputs
- Secret Key (Base32)
- Code Length
- Period
- Algorithm
Results
- Current Code
- Time Remaining
- Next Code
- QR Code for Setup
- otpauth:// URI
- Invalid secret key
- Enter a secret to generate QR code
Consistency and speed define a good generator. The TOTP Generator delivers both by following well-defined rules to produce each output. Start by filling in secret key (base32), code length, period and algorithm. Based on these values, the tool computes current code, time remaining, next code and other key metrics. The quality of generated output depends on the randomness source and the constraints applied.
QR codes use Reed-Solomon error correction, with four levels (L, M, Q, H) tolerating 7% to 30% damage. Whether you need to generate time-based one-time passwords for 2fa for a quick check or a thorough analysis, this tool adapts to both. If you need reproducible output for testing, use a seeded pseudo-random generator instead of true randomness. Time-based One-Time Password - generates codes that change every 30 seconds for 2FA. Compare multiple scenarios by saving or noting each result before changing inputs.