Developer testing
Generate test TOTP secrets to verify your 2FA implementation validates codes correctly before shipping.
Generate time-based one-time passwords (TOTP) and scannable QR codes, compatible with Google Authenticator, Authy, Microsoft Authenticator, and all RFC 6238 apps.
Email or username displayed in your authenticator app.
Your service or application name.
Store this securely — it's the root of your 2FA codes.
Code refreshes automatically at each time boundary. Enter it in your app before the timer expires.
TOTP (Time-Based One-Time Password, RFC 6238) builds on the HOTP algorithm (RFC 4226) by replacing a counter with a time value. Both your authenticator app and the server share a secret key and independently compute HMAC-SHA1 over the current 30-second window. Because neither party needs to transmit the code in advance, interception provides no benefit — the window expires before it can be replayed. This makes TOTP one of the most widely deployed second-factor mechanisms in the world, used by Google, GitHub, AWS, Cloudflare, and thousands of other services.
This generator is entirely browser-based. The Web Crypto API (crypto.subtle) handles all HMAC computation without sending a single byte to any server. The secret is encoded in RFC 4648 Base32 — the format expected by every major authenticator app. The resulting otpauth:// URI encodes the algorithm, digit count, period, and issuer, making it trivially scannable as a QR code. Store your raw secret in a password manager so you can re-enrol if you change devices.
Step 1: Click Generate / Refresh to create a new Base32 secret. Optionally enter your account email and service name so they appear clearly in your authenticator app.
Step 2: Open your authenticator app (Google Authenticator, Authy, Microsoft Authenticator, 1Password, etc.) and choose 'Scan QR code'.
Step 3: Point the camera at the QR code on screen. The tool is now enrolled. Verify the live code here matches the one in your app.
Step 4: Store the raw Base32 secret in your password manager as a backup. If you lose your phone, you can re-enrol from the secret alone.
Generate test TOTP secrets to verify your 2FA implementation validates codes correctly before shipping.
Set up two-factor authentication for personal services that support TOTP, even when the provider's UI is inconvenient.
Demonstrate live how TOTP works in workshops, making the time-based algorithm visible and tangible for students.
Generate and verify codes without a mobile device — useful in air-gapped environments or when your phone is unavailable.
TOTP (Time-Based One-Time Password, RFC 6238) generates a short numeric code from a shared secret and the current Unix time. The code refreshes every 30 seconds and provides a second authentication factor beyond just a password.
No. Everything runs in your browser using the Web Crypto API (HMAC-SHA1/SHA-256/SHA-512). Your secret key, QR code, and generated tokens never leave your device.
Yes. The tool generates a standard otpauth:// URI and a scannable QR code compatible with Google Authenticator, Authy, Microsoft Authenticator, 1Password, and all RFC 6238 compliant apps.
TOTP secrets are encoded in Base32 (RFC 4648) — only uppercase A–Z and digits 2–7. This format avoids ambiguous characters and is the standard expected by all authenticator apps.
Save both. The secret key is the source of truth. If you lose access to your authenticator app, you will need the raw secret to re-enrol. Store it in a secure password manager alongside your account credentials.
Share this tool
Help someone else shortcut their work
Send this page to a friend, student, or teammate who could benefit from it.