TOTP / 2FA Authenticator Simulator

Generate time-based one-time password (TOTP) 2FA verification codes from secrets or QR codes
This free online totp / 2fa authenticator simulator runs in your browser and is part of our Cryptography collection.

TOTP / 2FA Authenticator Simulator

Generate and test RFC 6238 Time-based One-Time Password (TOTP) codes for two-factor authentication from Base32 secret keys.

Current 2FA One-Time Passcode
- - - - - -
Refreshing in: 30s

Secret Key Configuration

Standard format provided by GitHub, Google, AWS, and Cloudflare.

Verify Code / Clock Window

Previous Window (-30s): -
Next Window (+30s): -

How RFC 6238 TOTP Works

  • Time-step counter: T = floor(current_unix_time / 30).
  • HMAC calculation: Computes HMAC-SHA1(Secret, T).
  • Dynamic Truncation: Extracts an offset index from the last nibble of the hash to extract a 31-bit integer, then formats modulo 10^digits.
  • Compatible with Google Authenticator, Authy, 1Password, and Bitwarden.
⚡
Instant In-Browser Execution Runs locally in JavaScript without wait times or server delays.
🔒
100% Privacy & Security Your inputs and files are never stored or logged on remote servers.
📱
Cross-Device Responsive Fully optimized for mobile smartphones, tablets, and desktop displays.
🎉
100% Free Forever No subscription fees, no signups, and no software installations.

How to Use the Online TOTP / 2FA Authenticator Simulator

1 Enter Base32 Secret Key

Paste the Base32 secret key provided by your service (e.g. Google, GitHub, AWS, Cloudflare), or click "🎲 Random" to test.

2 Select Algorithm & Digits

Choose SHA-1 (standard for Google Authenticator), SHA-256, or SHA-512, and select 6-digit or 8-digit output.

3 View Live One-Time Passcode

Observe the current 6-digit passcode and watch the animated 30-second countdown timer bar.

4 Copy Code Before Expiry

Click "📋 Copy" to paste the active 2FA code into your login screen before the 30-second period expires.

Frequently Asked Questions

Common questions about using this free online totp / 2fa authenticator simulator.

How does a TOTP code stay synchronized without an internet connection? ▾
RFC 6238 TOTP calculates passcodes using the current Unix timestamp divided by 30 seconds: `T = floor(current_epoch_time / 30)`. Because both your device and the authentication server know the shared secret and UTC time, they arrive at the identical code simultaneously.
Why are most 2FA codes 6 digits and valid for 30 seconds? ▾
RFC 6238 established 30 seconds as the ideal window balancing human typing convenience with security against replay attacks, and 6 digits as easy to remember and type.
What causes a TOTP code to be rejected during login? ▾
The most common cause is device clock drift. If your computer or phone clock is off by more than 30–60 seconds, the generated code will belong to a past or future time step.
Can I use this simulator as a backup 2FA authenticator? ▾
While this simulator accurately generates valid codes, you should store your original 2FA secrets securely and use dedicated mobile authenticator apps (e.g. Google Authenticator, Authy, 1Password) for daily logins.

More Cryptography

Explore related tools in the same category to solve adjacent tasks faster.

Hash GeneratorGenerate MD5, SHA-1, SHA-256, SHA-512 hashesBcrypt Hash GeneratorGenerate secure bcrypt password hashesCrypto Random GeneratorGenerate cryptographically secure random dataHMAC GeneratorGenerate HMAC signatures for authenticationPBKDF2 Key DerivationDerive cryptographic keys from passwords