Security, Hash & Crypto

2FA / TOTP Code Generator

The 2FA / TOTP Code Generator turns a Base32 secret key into the same rotating 6-digit codes produced by authenticator apps. It implements the RFC 6238 TOTP standard (HMAC-SHA1, 30-second window) entirely in your browser, so your secret never leaves your device.

What is a TOTP / 2FA code?

A TOTP (Time-based One-Time Password) is a short numeric code that changes every 30 seconds and is used as the second factor in two-factor authentication. Both the server and your authenticator app share a secret key and combine it with the current time to derive the same code — no internet connection required.

This tool reproduces that calculation in the browser. Paste the Base32 secret you were given during 2FA setup (the text shown under the QR code) and it generates the current 6-digit code along with a live countdown to the next one.

How it works

  • Implements RFC 6238 TOTP with HMAC-SHA1, a 30-second period and 6-digit output
  • Compatible with Google Authenticator, Authy, Microsoft Authenticator and 1Password
  • Runs 100% client-side using the Web Crypto API — your secret is never transmitted or stored
  • Live countdown bar shows exactly when the code refreshes

Common uses

Developers use it to test TOTP integration without installing an app, support teams use it to verify enrollment flows, and power users keep a backup way to read codes from a secret they have saved securely. Treat the secret like a password — anyone with it can generate your codes.

Related searches

totp generator2fa code generatorauthenticator code onlinegoogle authenticator generatorotp generatortime based one time passwordrfc 6238 totptwo factor authentication code

Recommended Security, Hash & Crypto tools

Explore more free online tools related to 2FA / TOTP Code Generator.