Toolvist

TOTP Code Generator

Generate time-based one-time passwords from a secret key, with a live countdown timer.

Letters A-Z and digits 2-7. Spaces and dashes are ignored.

30

seconds

—

Current code

Click to copy

Next code

otpauth:// URI

TOTP Code Generator

Generate the same time-based one-time passwords your authenticator app uses. Enter the Base32 secret you were given when setting up two-factor authentication, and this tool shows the current 6-digit code with a countdown to the next one.

TOTP codes are time-based one-time passwords; if you need a long-lived secret instead, the Random Token Generator is the right choice, and the Password Generator covers login credentials.

How to use the TOTP Generator

  1. 1 Paste the shared secret, which is usually a Base32 string from a QR code.
  2. 2 Read the current six-digit code and the countdown to the next one.
  3. 3 Enter the code before the timer expires — most services allow one step of drift.
  4. 4 Adjust the period or digit count only if your service uses non-standard values.

How to Use

Paste your Base32 secret (the string shown under the QR code when you set up 2FA), then read the live code. The ring shows how many seconds remain before the code rotates.

  • Standards-compliant RFC 6238 TOTP
  • Configurable digits (6 or 8) and period (30 or 60 seconds)
  • Live countdown with automatic rollover
  • Shows the current and next code
  • Your secret is never transmitted anywhere

Frequently asked questions

How does a TOTP code work?

Both sides share a secret. Each computes an HMAC of the current time step — usually the number of 30-second intervals since 1970 — and truncates the result to six digits. Because the input is the clock, both sides agree without any communication.

Why is my code rejected?

Almost always clock drift. If your device time is more than about 30 seconds out, the code belongs to a different time step and the server will not match it. Enable automatic network time on your phone or computer and the problem disappears.

Is a TOTP secret as sensitive as a password?

More so. The secret generates every future code, so anyone who has it can produce valid codes indefinitely — which is why it is shown once and stored in an authenticator app. Treat it like a password you can never change.

Related Security & Cryptography Tools

Browse all Security & Cryptography Tools →

You might also need

Tools from other categories that people pair with the TOTP Generator:

Browse the full tool directory →