Skip to content

TOTP / 2FA code generator

Paste a base32 secret to see the live time-based authenticator code (RFC 6238), the same six digits an app like Google Authenticator would show. Everything runs in your browser — your secret never leaves your device.

Advanced options
——————
30s

Enter a secret to generate a code.

What is a TOTP code?

A TOTP (Time-based One-Time Password, RFC 6238) is the six-digit code an authenticator app shows for two-factor authentication. It is derived from a shared secret and the current time, so it changes every 30 seconds and can only be used once.

When a site shows you a QR code to "add to your authenticator", that QR encodes an otpauth:// URI containing the base32 secret. Paste that secret here and you get the same code your phone would — handy for testing a login flow, debugging an integration, or recovering access when your authenticator app is not to hand.

Security note: this tool never sends your secret anywhere — the code is computed locally with the Web Crypto API. Still, treat a real 2FA secret like a password and only paste secrets you own.

Frequently asked questions

Is this TOTP generator safe?

The code is computed entirely in your browser using the Web Crypto API — your secret is never transmitted or stored. That said, only paste secrets for accounts you own.

What secret format does it accept?

A base32 secret, the format shown when a site lets you set up 2FA manually (e.g. JBSWY3DPEHPK3PXP). Spaces are ignored.

Why does my code differ from my phone?

Almost always a clock difference. TOTP depends on the current time, so if your device clock is off by more than a few seconds the codes drift. It can also differ if the site uses non-default digits, period or algorithm — set those under Advanced options.

Does this replace my authenticator app?

No. It is a testing and recovery utility. For everyday security, keep your secrets in a dedicated authenticator app.