TOTP 2FA Code Generator & Verifier
Generate and verify Time-based One-Time Password (TOTP) codes used by apps like Google Authenticator, Authy, and Microsoft Authenticator. Runs entirely in your browser — your secret key never leaves your device.
TOTP (RFC 6238) generates a short code by computing HMAC-SHA1 (or SHA-256/SHA-512) over the current 30-second time window and a shared secret key. The same code appears on both the server and authenticator app for that window, enabling strong two-factor authentication without transmitting any password.
Zero Server Uploads
Files process in local RAM
Instant WASM Speed
No waiting queues or lags
Unlimited Batching
Convert files without limits
What Does TOTP 2FA Code Generator Do & How Does It Work?
TOTP (RFC 6238) generates a short code by computing HMAC-SHA1 (or SHA-256/SHA-512) over the current 30-second time window and a shared secret key. The same code appears on both the server and authenticator app for that window, enabling strong two-factor authentication without transmitting any password.
How to Use TOTP 2FA Code Generator (Step-by-Step)
- 1Generate a new secret or paste an existing Base32 secret.
- 2Configure digits (6 or 8), algorithm (SHA-1, SHA-256, SHA-512), and period (30s or 60s).
- 3Copy the current code into your app or service.
- 4Use Verify to check a code against the secret, with ±1 step drift tolerance.
- 5Export the otpauth:// URI or QR code to provision an authenticator app.
How TOTP works (RFC 6238)
TOTP divides Unix time into 30-second intervals (counter = floor(time / 30)), then applies HMAC-SHA1 with your secret key. The last 4 bits of the MAC select a 4-byte offset; those 4 bytes (with the high bit cleared) are taken modulo 10⁶ (or 10⁸) to produce the code.
The QR code encodes an `otpauth://totp/...` URI. Scan it with Google Authenticator, Authy, or any RFC 6238-compatible app.
Security recommendations
Always pair TOTP with a strong password. Store your backup codes securely — if you lose your authenticator and secret, account recovery can be impossible.
Prefer SHA-256 or SHA-512 over SHA-1 for new integrations. However, many services only support SHA-1/6-digit/30s, which is still secure for TOTP.
Frequently Asked Questions
Is this compatible with Google Authenticator?
Yes, for the default SHA-1 / 6-digit / 30-second configuration. Scan the QR code or copy the otpauth:// URI.
Does the secret leave my browser?
No. All TOTP calculations run in your browser using the Web Crypto API and pure JS. The secret never touches our servers.
My code doesn't match — what's wrong?
The most common cause is clock drift. Ensure your device clock is synchronized (NTP). The verifier accepts ±1 time-step (±30 seconds) by default.
Is it free? Do I need an account?
It's completely free with no sign-up and no daily credits.
Explore More Free Browser Tools
View All 290+ Tools Directory →All tools run client-side in your browser with zero data uploads, no sign-up, and zero tracking. Discover other popular converters and calculators:
Cryptographic Standards & Zero-Knowledge Privacy Architecture
TOTP 2FA Code Generator is engineered to strict security and cryptographic specifications — guaranteeing zero data leakage, zero backend telemetry, and audited implementation:
- 1. 100% Zero-Knowledge Client Execution: Passwords, private keys, hashes, and API tokens are computed strictly in your browser's local memory via Web Crypto API (SubtleCrypto) and audited @noble/hashes. Nothing is ever sent to or stored on our servers.
- 2. Official RFC & NIST Compliance: Adheres to established security specifications including RFC 2104 (HMAC), RFC 6238 (TOTP), RFC 9106 (Argon2id), RFC 4122 (UUID v4), and FIPS 180-4 (SHA family).
- 3. Memory-Hard & Brute-Force Resilient: Incorporates robust hashing algorithms (Argon2id, bcrypt, PBKDF2) with configurable memory and iteration costs to defend against GPU-accelerated cracking.
- 4. Transparent & Inspectable: Every cryptographic calculation occurs visibly in client-side JavaScript. You can verify through your browser's Network tab that zero outbound requests are made with your sensitive inputs.
- 5. SSRF-Safe Diagnostic Probing: For internet-facing checks (SSL certificates, DNS records, HTTP security headers), handshakes run through isolated proxies that never log or store queried domains.
Suggest a Feature or Improvement for TOTP 2FA Code Generator
Need custom options, higher limits, or extra format support? Let our engineering team know!