DevKits

OTP Generator — TOTP One-Time Password Generator for 2FA Testing | DevKits

Generate time-based one-time passwords (TOTP RFC 6238) from a Base32 secret. Real-time counter with 30-second expiry. Perfect for 2FA testing and authenticator app debugging. 100% local.

Last updated:

Comments

Generate TOTP 6-digit time-based one-time passwords from any Base32 secret.

One-Time Code

------

Expires in 30s

Use this OTP for 2FA testing. Paste your authenticator app's Base32 secret to generate matching codes.

What is OTP Generator?

TOTP (RFC 6238) is the algorithm behind Google Authenticator, Authy, and every '6-digit code that changes every 30 seconds' 2FA app. It computes HMAC-SHA1 over the secret key and the current 30-second counter, then truncates to 6 digits. This generator reproduces that algorithm using Web Crypto API.

How to generate OTPs

  1. 1Paste your Base32 secret.
  2. 2A 6-digit code appears and refreshes every 30 seconds.
  3. 3Use it for 2FA login testing or debugging authenticator app mismatch.

Frequently Asked Questions

What's the difference between TOTP and HOTP?

TOTP (RFC 6238) generates codes based on the current time, typically expiring every 30 seconds. HOTP (RFC 4226) generates codes based on a counter that increments each use. Most authenticator apps (Google, Authy) use TOTP.

Where do I get the Base32 secret?

When you enable 2FA on a service, you're usually shown a QR code. The URL encoded in that QR code (otpauth://totp/...) contains the Base32 secret. You can extract it by scanning the QR code with a reader.

Try Next

AES Encrypt / Decrypt

Encrypt and decrypt text with AES (128 / 192 / 256, GCM authenticated or CBC legacy) using a password. PBKDF2 key derivation with 200,000 iterations. 100% local — the Web Crypto API runs entirely in your browser.

Related Tools

Reference & Guides