TOTP Generator

TOTP Generator

Generate Time-based One-Time Passwords (RFC 6238) from a Base32 secret key; shows current, previous, and next codes with a QR code and countdown timer; supports SHA-1, SHA-256, SHA-512 algorithms.

Typically found in authenticator app setup QR codes as the secret query parameter

Enter a Base32 secret key to generate codes

About TOTP

TOTP (Time-based One-Time Password) is an algorithm standardised in RFC 6238. It generates a short-lived code by computing HMAC of the current time window using a shared secret.

StandardRFC 6238
Default algorithmHMAC-SHA1
Default period30 seconds
Secret encodingBase32
Never share your real TOTP secrets with untrusted tools. Use test keys for demonstration purposes.

TOTP Generator

Generate Time-based One-Time Passwords (RFC 6238) from a Base32 secret key; shows current, previous, and next codes with a QR code and countdown timer; supports SHA-1, SHA-256, SHA-512 algorithms.

Common uses

  • Generate a TOTP code from a Base32 secret
  • Set up a QR code for an authenticator app
  • Create a new TOTP secret for user onboarding
  • Generate an HOTP code for a hardware token

Also searched as

  • totp code generator online
  • 2fa code generator from secret key
  • generate totp secret
  • hotp generator online
  • otpauth qr code generator
  • test 2fa codes for development
  • rfc 6238 totp calculator
  • base32 secret key generator

Frequently asked questions

How do I generate a 2FA code from a secret key?

Enter the Base32 secret in the Generate Code tab to see the current, previous and next codes with a countdown. SHA-1, SHA-256 and SHA-512 are supported.

How do I create a new TOTP secret and QR code?

The Secret Generator tab creates a Base32 secret, and the tool shows a QR code you can scan in an authenticator app.

Can I generate counter-based HOTP codes?

Yes, the HOTP tab generates counter-based one-time passwords (RFC 4226).

Should I use this instead of my authenticator app?

It is best for testing and development. Entering real account secrets into any web page carries risk.

Is my data uploaded to a server?

No. This tool runs entirely in your browser — your input is processed locally on your device and is never uploaded or stored on a server.