Security & Crypto · TOTP 2FA

Local RFC 6238 TOTP 2FA Authenticator Code Generator

Test two-factor authentication implementations, verify Base32 secrets, and inspect live 30-second countdown codes + otpauth:// provisioning URIs—100% locally via browser WebCrypto HMAC-SHA1.

✓ 100% Browser-Local · Zero Upload Reviewed: 2026-11-26

Initializing local browser workspace...

Test and Verify Two-Factor Authentication Codes Offline

Developers building 2FA login flows or backing up TOTP recovery seeds need a trustworthy way to verify that their backend Base32 secret matches standard Authenticator apps without leaking secrets to third-party APIs. WebCrypto computes identical RFC 6238 codes right in your tab.

  • Implements exact RFC 6238 Time-Based One-Time Password (TOTP) using WebCrypto HMAC-SHA1
  • Live 1-second countdown timer automatically rotating codes at every 30s or 60s window
  • Supports both standard 6-digit (Google Authenticator / Authy) and 8-digit enterprise tokens
  • Generates compliant otpauth://totp/ provisioning URIs ready to feed into our Offline QR Generator
  • One-click CSPRNG Base32 secret key generator for spinning up test 2FA accounts
  • 100% offline browser calculation—never enter live 2FA secrets on server-backed websites

Step-by-Step Guide

  1. Paste a Base32 TOTP secret (letters A–Z and digits 2–7) or click Random Secret to mint a fresh 160-bit test seed.
  2. Choose your time step (standard 30s) and token length (standard 6 digits).
  3. Read the rotating code and live remaining countdown seconds—click Copy Code to grab the raw unspaced digits.
  4. Optionally copy the generated otpauth:// URI into our Offline QR Code Generator to scan into a mobile authenticator app.

Why TOTP Verification Fails Between Server and Client

System Clock Drift Exceeding ±30 Seconds

TOTP hashes the current Unix epoch divided by 30. If a VPS or developer laptop clock drifts by more than 30 seconds without NTP sync (chrony/systemd-timesyncd), every generated 2FA code fails.

Passing UTF-8 Secret Bytes Instead of Base32-Decoded Bytes

Standard otpauth secrets like JBSWY3DPEHPK3PXP are Base32-encoded. Hashing the ASCII characters directly instead of Base32-decoding them first produces completely wrong 6-digit codes.

Testing Production Master Secrets on Shared Machines

Even on client-side tools, clear browser clipboard history after testing sensitive seeds and always store production 2FA recovery codes in a dedicated hardware key or encrypted vault.

Authentication Engineering & DevOps Workflows

  • Unit-testing Node.js, Python, Go, or Rust RFC 6238 TOTP enrollment endpoints during local development.
  • Verifying backed-up Base32 recovery seeds before resetting or migrating phones.
  • Generating otpauth:// URIs paired with our offline QR Code Generator for air-gapped onboarding demos.

Frequently Asked Questions

Are Base32 secrets ever transmitted over the internet?

No. Base32 decoding and HMAC-SHA1 signing execute purely inside your browser's native window.crypto.subtle engine with zero network calls.

Why does my generated code not match my phone's authenticator app?

Verify that both your computer and phone have automatic network time synchronization enabled, confirm the Base32 secret has no typos (O vs 0, I vs 1), and verify 30s / 6-digit settings.

Can I convert the otpauth:// URI into a scannable QR code privately?

Yes! Click 'Offline QR Code Generator' in the Continue Processing bar right below the workspace and paste the otpauth:// URI—both tools run 100% offline.

Local Privacy Guarantee: All Base32 decoding and WebCrypto HMAC-SHA1 TOTP derivation stay strictly in local browser memory with zero transmission.