2FA TOTP Code Generator

Generate two-step verification codes from a secret key, just like Google Authenticator, in your browser.

🔒 The secret key equals access to your account: this tool never sends or stores it, but don’t paste it anywhere else or share it.

This tool runs entirely in your browser — no data is uploaded to our servers.

Was this tool helpful?

What are TOTP codes?

When you turn on two-step verification and use an app like Google Authenticator or Microsoft Authenticator, the site shows a QR code containing a secret key. The app combines this key with the current time to generate a 6-digit code that changes every 30 seconds. The method is called TOTP, an open standard (RFC 6238), and this tool implements it exactly, inside your browser.

When is it useful?

  • Developers and testers: test the two-step feature of your app without a phone.
  • Learning how it works: watch the code change and see why your phone clock must be accurate.
  • Checking a backup key: confirm that a saved backup key produces the same codes as your app.

How to use it

  1. Paste the secret key (letters and digits like JBSWY3DPEHPK3PXP) or a full otpauth:// link.
  2. Keep the defaults (6 digits, 30 seconds, SHA-1) — what most sites use.
  3. The current code appears with a countdown and the next code.
  4. For a quick try, click “Generate a new test key”.

Why does a site sometimes reject a correct code?

Most often, the device clock is more than 30 seconds off. Turn on automatic time on your device. Most sites also accept the previous and next code to absorb small drifts.

Important security warning

The secret key is the second factor: whoever has it can generate your codes. So:

  • Don’t use this page as a permanent replacement for the authenticator app on your phone.
  • Never send the key to anyone or paste it on unknown sites. Any message asking for your verification code or key is a scam.
  • Store the recovery codes the site gives you in a safe place.

Everything is computed in your browser; the page never sends or stores the key. To learn more, read our guide to two-factor authentication.

Frequently asked questions

Is this a replacement for Google Authenticator?

We don’t recommend it. It’s great for testing and checking backup keys; for daily use, an app on your phone is better.

Is my secret key sent to your servers?

No. Codes are computed with Web Crypto in your browser; the key never leaves the page and isn’t stored.

Where do I find my account’s secret key?

It appears when you enable two-step verification, under the QR code (“Can’t scan? Enter this key”). Most sites don’t show it again afterwards.

Why is the code different from my app?

Check that settings match (digits, period, algorithm) and that your device clock is set automatically.

Request a new tool

Need a tool we do not have yet? Describe it briefly. We read every request and build the most wanted ones.