Skip to content
M2TOOLKIT

2FA TOTP Code Generator

Generate 2FA codes from a secret key, or create a new secret with a QR code.

  • Free
  • No sign-up
  • Runs in your browser
Digits
s

Enter or generate a secret to see codes.

For testing your own 2FA setup. Codes are computed in your browser with the Web Crypto API; the secret is never sent anywhere.

Everything you type is processed in your browser. Nothing you enter is sent to our servers or stored by us.

How to use the 2FA TOTP Code Generator

  1. Paste a Base32 secret, or generate a new one.
  2. Adjust digits, period or algorithm if your service uses non-defaults.
  3. Read the current code, or scan the QR code with an authenticator app.

What does this tool do?

TOTP (RFC 6238) is the algorithm behind Google Authenticator, Authy and similar apps: it combines a shared secret with the current time to produce a code that changes every 30 seconds.

This tool is useful for developers testing 2FA and for checking that an authenticator is set up correctly. Codes are computed with the Web Crypto API in your browser.

Why use it?

  • Standard RFC 6238 codes.
  • Setup QR code.
  • Previous and next codes.

Accuracy and limits

  • Keep 2FA secrets private — anyone with the secret can generate your codes.

Privacy

Everything you type is processed in your browser. Nothing you enter is sent to our servers or stored by us. There's no account to create and nothing to install.

Last reviewed by the M2Toolkit team.

Other tools people use alongside the 2fa totp code generator.