Skip to content
PwnDeck logoPwnDeck

TOTP Generator

Generate time-based one-time passwords (TOTP) from a Base32 secret key. Features real-time countdown and auto-refresh every 30 seconds.

Advertisement

How to Use the TOTP Generator

  1. Enter your TOTP secret key in Base32 format.
  2. The current 6-digit code is generated and displayed automatically.
  3. Watch the countdown timer to know when the code refreshes.
  4. Copy the code before it expires (new code every 30 seconds).

About TOTP Generator

TOTP (Time-Based One-Time Password) is defined in RFC 6238 and is the algorithm behind authenticator apps like Google Authenticator, Authy, and Microsoft Authenticator. It combines a shared secret key with the current time to generate a unique 6-digit code that changes every 30 seconds. The algorithm uses HMAC-SHA1 to hash the time counter with the secret key, then extracts a 6-digit code through dynamic truncation. TOTP is widely used for two-factor authentication (2FA) and provides a second layer of security beyond passwords. This tool implements the standard TOTP algorithm using the Web Crypto API, processing everything in your browser.

Advertisement

Frequently Asked Questions

When setting up 2FA on a service, you are usually shown a QR code and a text secret key (Base32 encoded). The secret key is typically a string of uppercase letters and numbers like JBSWY3DPEHPK3PXP.

TOTP codes depend on accurate time synchronization. If your device clock is off by more than a few seconds, codes may not match. Ensure your device time is synchronized with an NTP server.

This tool runs entirely in your browser using the Web Crypto API. Your secret key never leaves your device. However, for production 2FA secrets, it is best practice to use a dedicated authenticator app.