TOTP Generator

Generate time-based one-time codes from a secret, view time remaining and test two-factor authentication setup.

Free
Local-only
Enter a Base32 secret to generate the current TOTP code.
Secret
Not loaded
Config
SHA-1 / 6 digits / 30s

Advanced settings

Only change these values when your issuer does not use the default TOTP settings.

Saved keys

Saved keys are stored in localStorage for this browser only. Avoid saving production credentials on shared devices.

Saved keys stay in this browser only.

Usage notes

  • By default, secrets stay in memory only. You can explicitly enable local persistence on this device.
  • Use otpauth URIs to prefill issuer, account, period, digits, and algorithm.
  • Authenticator apps often expect 30-second / 6-digit / SHA-1 unless configured otherwise.

What is TOTP Generator tool?

Generate time-based one-time codes from a shared secret or otpauth URI. See the current code and time remaining while checking the period, digits and algorithm used by a two-factor authentication integration. Debug a two-factor login integration. Check whether mismatched clocks or settings explain rejected codes.

How to use it

  1. Enter a Base32 secret or an otpauth URI for a test account.
  2. Confirm the period, code length and algorithm match the integration.
  3. Compare the current code with your authenticator or test service.

FAQ

Code generation runs locally. Secrets stay in page memory by default, but you can explicitly enable device storage or load credentials from URL parameters. URLs can expose credentials through history or sharing; use test secrets and a trusted device.

TOTP codes are time-based. Make sure your device clock is accurate (within a few seconds of UTC). Also verify that the period (30s vs 60s) and digit count (6 vs 8) match the settings used when the secret was registered.

This tool is intended for testing and debugging 2FA integrations, not for managing live account credentials. For production use, store your secrets in a dedicated authenticator app or password manager.

Related Tools