Security Tools

TOTP codes.

Paste a Base32 authenticator (2FA) secret and get a live, auto-refreshing 6-digit code — computed locally with the standard TOTP algorithm (RFC 6238). Nothing is sent over the network; there isn't even a network call in this page.

How to generate a TOTP code

  1. Paste the Base32 secret, the setup key shown next to a two-factor QR code. Spaces are fine.
  2. Choose the digits, period and algorithm if the service uses non-standard values; the defaults suit most.
  3. Press Start generating. A live code appears and refreshes automatically.

When this is useful

Authenticator apps compute a short code from a shared secret and the current time. This page does the same calculation, which lets you test a two-factor setup before you rely on it, check that a service accepts the code you expect, or debug a mismatch between devices. It implements the standard algorithm, RFC 6238 on top of RFC 4226, and was checked against the official test vectors for SHA-1, SHA-256 and SHA-512.

If a code is rejected, the usual cause is a wrong clock. Time-based codes only work when your device time is correct within a few seconds. Treat the secret like a password: anyone who has it can generate your codes.

The secret stays in the frame

The generator runs in your browser, inside an isolated frame on this page that has no network access. Your file is read and written back by your own device, so it is not uploaded to TNAADO or anyone else, and nothing is stored. The advertising on this page sits outside the frame and cannot see what you choose. There is no network call in the frame, so the secret and every code derived from it remain on your device.

How it works

Worked example: the RFC 6238 test secret

RFC 6238 Appendix B uses the ASCII secret 12345678901234567890, which is GEZDGNBVGY3TQOJQGEZDGNBVGY3TQOJQ in Base32. The time step is 30 seconds, so the counter is the Unix time divided by 30, rounded down. Using SHA-1:

Unix timeCounter8-digit code6-digit code
59194287082287082
11111111093703703607081804081804
11111111113703703714050471050471
12345678904115226389005924005924

The 6-digit code is the last six digits of the 8-digit value (dynamic truncation modulo 106), including leading zeros. Enter the Base32 secret above with 8 digits and a 30-second period to see live codes that follow the same algorithm.

Next steps: otpauth URI parser and builder, encrypt and decrypt, or password strength checker.

Frequently asked questions

What is a TOTP code?

A time-based one-time password. The authenticator and the server share a secret, and each computes an HMAC of the current 30-second time step to get the same short code.

Why do my codes not match my phone?

Usually the secret, period, digit count or algorithm differ, or the device clock is off by more than a time step. Check these settings in the Advanced section.

Is it safe to paste my real 2FA secret here?

The page makes no network request, but a high-value secret is best kept only in your authenticator app. Use this for test accounts and integration testing.

Which algorithms are supported?

SHA-1 (the default used by almost every app), SHA-256 and SHA-512, with 6 or 8 digits and a configurable period.

Advertisement
Advertisement