TOTP 2FA Authenticator Code Generator
Generate real-time time-based one-time password (TOTP) two-factor authentication codes from Base32 secret keys directly in your browser.
At a glance
TOTP 2FA Authenticator Code Generator is a free browser tool that generates TOTP two-factor authentication codes online. It seamlessly switches between SHA-1 (Google Authenticator standard), SHA-256, and SHA-512 cryptographic digests. Real-time visual progress timer automatically recalculates verification codes at boundary transitions. Nothing is uploaded and no sign-up is needed — everything runs on your device.
100% Client-Side RFC 6238 / RFC 4226 Execution
All Base32 decoding, HMAC hashing, and OTP token generation occur locally in your browser memory. Your 2FA secrets are never sent over the internet.
RFC6238: demo@example.com
Google Authenticator standard is SHA-1
Most consumer services use 6 digits
Standard RFC 6238 time step is 30s
Clock Drift Inspector (Window T-1, T, T+1)
You May Also Need
Related Cryptographic & Security ToolsToken Generator
Generate secure CSPRNG API keys, secret bearer tokens & hex keys.
HMAC Generator
Compute HMAC signatures for Stripe, GitHub webhooks & REST APIs.
QR Code Generator
Generate scannable 2FA authenticator QR codes from otpauth URIs.
Hash Generator
Generate SHA-256, SHA-512, MD5, and SHA-1 checksums instantly.
Why Use This TOTP 2FA Authenticator Code Generator?
How to Use TOTP 2FA Authenticator Code Generator
Enter Your Secret Key
Paste your Base32 two-factor authentication secret key (e.g. JBSWY3DPEHPK3PXP) or a complete otpauth:// URI into the input field.
Select Parameters
Choose the hash algorithm (SHA-1, SHA-256, SHA-512), digit length (6 or 8 digits), and time interval (30s or 60s).
Copy the Active 2FA Code
Watch the live countdown timer and click the copy button to grab the active verification code before the window refreshes.
RFC 6238 Vector: SHA-1 8-Digit Code at 59 Seconds
The engine Base32-decodes the secret, packs the counter as 8-byte big-endian, HMAC-hashes it, and applies RFC 4226 dynamic truncation locally.
Secret (example, not real): JBSWY3DPEHPK3PXP | SHA-1, 8 digits, period 30s, epoch 59s
Code: 94287082 (counter 1) | otpauth://totp/Test:demo@example.com?secret=JBSWY3DPEHPK3PXP&digits=8&period=30
Technical Specifications & Engine Details
| Specification | Details |
|---|---|
| Supported Formats | BASE32, OTPAUTH, TEXT → TOTP, OTP, TEXT |
| Execution Mode | 100% Client-Side In-Browser (client) |
| Browser Requirements | Requires modern web browser with Web Cryptography API (SubtleCrypto). |
| Performance Constraints | Client browser memory limit (typically 1–2 GB RAM); processing speed depends on local device CPU. |
100% Client-Side Privacy Guarantee
All HMAC calculations, Base32 decoding, and token generations run 100% locally in your browser memory. No secret keys or authentication data are ever transmitted over the network.
Frequently Asked Questions
What is a TOTP (Time-Based One-Time Password)?
Is it safe to generate TOTP codes in this web tool?
What Base32 format does this tool require?
How do I test for server clock drift?
Methodology
This tool runs entirely in your browser. The example above shows a representative input and the result it produces.
Last updated .