OTP code generator
Generates and verifies time-based one-time passwords (TOTP) for two-factor authentication setups.
Generate and validate time-based OTP (one time password) for multi-factor authentication.
Steps and notes
What is OTP code generator?
Generate and validate time-based one-time passwords (TOTP) from a base32 secret — the same mechanism behind Google Authenticator-style codes. Useful for testing your own MFA implementation, decoding a setup key before scanning it into an app, or verifying that a code is currently valid.
- Enter the secret (Base32)
- Click generate to get the current code
- To verify, enter the code the other party provided and compare
- TOTP depends on the device clock — too large a time difference makes codes fail to match indefinitely
Frequently asked questions
- How does the 6-digit code get calculated?
- The secret plus the current time (in 30-second steps) go through HMAC, and a slice of the result becomes the code. Same secret + same time window = same code, which is why phone and server agree.
- Why did my code stop matching?
- Clock drift. TOTP depends on the device clock — too large a difference from the server makes codes fail indefinitely. Re-sync the device time or re-enrol the secret.
- Is the base32 secret sensitive?
- Completely — anyone holding it can generate your codes forever. Store it like a password, and enrol it in an authenticator app rather than pasting it around.
Category: Web
ID generators workflow
UUID Generator — v4, v1, v3, v5 and NIL IDs → ULID Generator — Time-Ordered, Sortable IDs Online → Nano ID Generator — Short, URL-safe Unique IDs Online → Token Generator → Password Generator → OTP code generator → BIP39 passphrase generator