Indicose

All tools / Passwords & Authentication / 2FA (TOTP) Code Generator

2FA (TOTP) Code Generator

Generate time-based one-time codes from a Base32 secret, or create a new secret.

Current code
------

Uses standard RFC 6238 settings: HMAC-SHA1, 6 digits, 30-second period. Do not paste the secret of an account you care about into any online tool unless you trust it. This page runs offline once loaded, but a dedicated authenticator app is the safer long-term choice.

About this tool

Time-based one-time passwords (TOTP, RFC 6238) are the six-digit codes used by authenticator apps. A code is derived from a shared secret and the current time, and changes every 30 seconds.

Enter a Base32 secret to see the current code, which is handy for testing and development. You can also generate a random 160-bit secret. Everything is computed locally with HMAC-SHA1 from the Web Crypto API.

Security tips

  • If codes do not match, check that your device clock is accurate.
  • Save backup codes when enabling 2FA on an account.
  • For real accounts, use a dedicated authenticator app rather than a website.

Frequently asked questions

Is it safe to enter my 2FA secret?

The secret is processed in your browser and not sent anywhere. Even so, a secret that is typed into a web page is more exposed than one kept in an authenticator app. Use this tool mainly for testing.

Why does a code last 30 seconds?

The time is divided into 30-second steps. Servers usually accept the neighbouring steps as well to allow for clock drift.

Which settings are used?

HMAC-SHA1, 6 digits and a 30-second period, the defaults used by Google Authenticator and most apps.

Related tools