TOTP Generator

Generate Time-based One-Time Passwords (RFC 6238) from a Base32 secret. Configurable algorithm, period, and digit count.

How to generate a TOTP code

  1. Paste the Base32 secret from a service's 2FA setup page, or a full otpauth:// URI. Its settings are filled in automatically.
  2. Check the algorithm, period, and number of digits. Most services use SHA-1, 30 seconds, and 6 digits.
  3. Copy the current code before the countdown runs out. The previous and next codes are shown too.

Built for developers and testers

Use this tool to check a TOTP implementation against RFC 6238, debug a 2FA setup that keeps rejecting codes, or generate codes for test accounts in development and QA. It supports SHA-1, SHA-256, and SHA-512, 30- or 60-second periods, and 6- to 8-digit codes, and shows the current time window and step counter.

Frequently asked questions

Is my 2FA secret sent anywhere?

No. Codes are computed in your browser with the Web Crypto API. The secret is never sent or saved, and disappears when you close the tab.

Should I use this instead of an authenticator app?

Not for everyday logins. A 2FA secret is meant to live only on a separate device, and keeping it in a browser tab weakens that second factor. Use an authenticator app for your real accounts.

Why don't my codes match?

TOTP depends on the clock, so check that your device's time is correct. Also confirm the algorithm, period, and digit count match what the service uses.

Related tools

More in Cryptography Tools · All 73 tools