2FA Code Generator (TOTP)
Generate 6-digit authenticator codes from a secret key.
Free online 2fa code generator (totp) by AIML Digital. It runs 100% in your browser: no sign-up, no limits, and nothing you enter is sent to a server.
Formulas
T = ⌊Unix time ÷ 30⌋HMAC = HMAC-SHA1(Base32-decode(secret), T as 8 bytes)Offset = HMAC[19] & 15Code = (31-bit value at offset) mod 10⁶
How it works
- The same algorithm Google Authenticator uses; the bar shows seconds left in the period.
Standard / source: RFC 6238 (TOTP) / RFC 4226 (HOTP).
Frequently asked questions
Is the 2FA Code Generator (TOTP) free?
Yes. The 2FA Code Generator (TOTP) by AIML Digital is completely free, with no sign-up, no limits and no watermark.
Is my data sent anywhere?
No. The 2FA Code Generator (TOTP) runs entirely in your web browser using JavaScript. What you type stays on your device.
What formula does the 2FA Code Generator (TOTP) use?
T = ⌊Unix time ÷ 30⌋; HMAC = HMAC-SHA1(Base32-decode(secret), T as 8 bytes); Offset = HMAC[19] & 15; Code = (31-bit value at offset) mod 10⁶.
How does the 2FA Code Generator (TOTP) work?
The same algorithm Google Authenticator uses; the bar shows seconds left in the period.
Does the 2FA Code Generator (TOTP) work on mobile?
Yes. It works in any modern browser on phone, tablet or desktop, and keeps working offline once loaded (except tools that load a helper library the first time).
More Security tools
- Password Generator — Strong random passwords with the rules you choose.
- Passphrase Generator — Memorable multi-word passphrases that are hard to crack.
- Password Strength Checker — See how strong a password is, offline. Nothing is sent anywhere.
- API Key & Token Generator — Random secrets in hex, base64url or alphanumeric.
- Encrypt / Decrypt Text — AES-256-GCM encryption with a password, entirely offline.