TOTP Code Generator — TOTP — Time-based One-Time Password, defined in RFC 6238 — is the algorithm behind the 6-digit codes in Google Authenticator, Authy, 1Password, and every other 2FA app. The codes rotate every 30 seconds (typically) and are derived from a shared Base32 secret plus the current time.
Codes are generated locally in your browser using the Web Crypto API. Your secret is never sent to a server.
Was TOTP Code Generator useful?
What is TOTP Code Generator?
TOTP — Time-based One-Time Password, defined in RFC 6238 — is the algorithm behind the 6-digit codes in Google Authenticator, Authy, 1Password, and every other 2FA app. The codes rotate every 30 seconds (typically) and are derived from a shared Base32 secret plus the current time.
This tool generates those codes locally using the Web Crypto API. Paste any Base32 secret (or an otpauth:// URI from a QR code) and watch the code refresh in real time. Nothing leaves your browser.
How to use it
-
Paste your secret
A Base32 string (A–Z, 2–7) or a full otpauth:// URI.
-
Read the code
The 6-digit code refreshes automatically. Copy it before the timer hits zero.
-
Use it within the window
Codes are valid for the period (default 30s). After that, a new one is generated.
Examples
Google Authenticator setup
After scanning a QR code, the service shows a 6-digit code that rotates every 30 seconds.
JBSWY3DPEHPK3PXP
Result: A 6-digit code, e.g. 492 039, with a 30-second countdown.
From an otpauth:// URI
Most QR codes encode a URI that includes the secret and parameters.
otpauth://totp/GitHub:user?secret=JBSWY3DPEHPK3PXP&issuer=GitHub
Result: Same code as above — the URI is parsed and the secret extracted.
Frequently asked questions
Related guides
How to Encrypt a Message with a Password (in Your Browser)
Encrypt messages with a password in your browser using PBKDF2 key derivation and AES-GCM authenticated encryption—without uploading plaintext.
The Myth of the Secure Password in 2026
Why a strong password alone cannot stop credential stuffing or phishing—and the four layers that actually protect accounts in 2026.
MD5 vs SHA-1 vs SHA-256 vs SHA-3: When to Use Each
MD5 vs SHA-1 vs SHA-256 vs SHA-3 compared: collision resistance, hardware speed, deprecation status, and why passwords need Argon2id instead of raw hashes.
Related tools
Password Generator
Create strong, random passwords with custom length and character sets — right in your browser.
Hash Generator
Generate MD5, SHA-1, SHA-256, and SHA-512 hashes of any text instantly.
JWT Decoder
Decode a JWT’s header and payload and check its expiration — without sending it anywhere.