TL
Tool Lab
💰Donate
💰Donate

TOTP / OTP Generator

Generate time-based one-time passwords from a Base32 secret. Compatible with Google Authenticator and Authy.

Base32 Secret Key

Save this secret key in a safe place. Use it in OTP apps like Google Authenticator.

Period
Digits

About This Tool

The OTP Generator uses the TOTP (Time-based One-Time Password) algorithm to produce 6–8 digit codes that refresh every 30 or 60 seconds.

Register the generated secret key in an OTP app like Google Authenticator or Authy to get matching codes. Use this tool to test and develop two-factor authentication (2FA) systems.

How to Use

  1. Click "Generate Secret" to create a random Base32 secret key.
  2. Choose the period (30s or 60s) and digit count (6 or 8).
  3. The current OTP code is displayed and refreshes automatically each period.
  4. Use the Copy button to copy the OTP code to your clipboard.

Use Cases

The OTP Generator is useful for developing and testing 2FA systems, building secure login flows, learning the TOTP protocol, and validating app integrations.

FAQ

  • Why does my OTP app show a different code?If your device clock is out of sync, codes will differ. Set your device time to automatic/network time.
  • Is the secret key safe?The secret key is never sent to a server. All processing happens locally in your browser.
  • What is the difference between TOTP and HOTP?TOTP is time-based and HOTP is counter-based. Most smartphone authenticator apps use TOTP.