TOTP / 2FA Code GeneratorMembers

Turn a Base32 secret or otpauth:// URI into live authenticator codes — RFC 6238 compatible with Google Authenticator and Authy.

🔒 Runs entirely in your browser — your secret is never uploaded

Enter a secret to begin

Paste a Base32 secret or an otpauth:// URI on the right, and your live code will appear here.

How TOTP works

The same standard your authenticator app uses — computed here, on your own device.

1

Shared secret

When you enable 2FA, the service shares a Base32 secret with your app (via that QR code). Both sides keep the same secret.

2

Time counter

The current Unix time is divided by the period (30s) to get a counter that both sides can compute independently — no network needed.

3

HMAC & truncate

An HMAC-SHA1 of the counter is dynamically truncated (RFC 6238) to the final 6-digit code that expires every period.

🔒

Private by design. Codes are computed locally with the browser's Web Crypto API. Your secret never leaves your device and we never see it.

Frequently Asked Questions

What is a TOTP code?
A TOTP (Time-based One-Time Password) is the 6-digit code an authenticator app shows for two-factor authentication. It's derived from a shared secret and the current time, so it changes every 30 seconds and can be verified without any network round-trip.
What can I paste in the secret box?
Either the Base32 secret key a service gives you (letters A–Z and digits 2–7, spaces are ignored), or a full otpauth://totp/... URI — the same string encoded in a setup QR code. If you paste a URI, the secret, digit count and period are read from it automatically.
Is this compatible with Google Authenticator and Authy?
Yes. It implements the standard RFC 6238 algorithm (HMAC-SHA1, 6 digits, 30-second period) that Google Authenticator, Authy, Microsoft Authenticator, 1Password and most other apps use, so the codes match exactly.
Why does the code change every 30 seconds?
The code is computed from a time counter equal to the current Unix time divided by the period (30 seconds by default). Each time that counter ticks over, a fresh code is produced and the old one expires — that's what makes it a one-time password.
Is entering my secret here safe?
Everything runs locally in your browser using the built-in Web Crypto API — your secret is never sent anywhere and we never see it. That said, for your real accounts a dedicated authenticator app on your phone is the safer place to store secrets long-term. This tool is best for testing, recovery and development.
My code is rejected — what's wrong?
The most common cause is a clock that's out of sync: TOTP relies on accurate time, so check your device's clock is set automatically. Also confirm the digit count and period match what the service expects, and that the secret was copied in full.