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
- Paste the Base32 secret, the setup key shown next to a two-factor QR code. Spaces are fine.
- Choose the digits, period and algorithm if the service uses non-standard values; the defaults suit most.
- 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.
- Do not use this page as a replacement for an authenticator app on a shared computer.
- Clear the secret when you have finished.
How it works
- Standard algorithm: this is RFC 6238 TOTP on top of RFC 4226 HOTP — the same algorithm every authenticator app uses. The secret is Base32-decoded, combined with the current 30-second time step via HMAC, then dynamically truncated to a 6-digit code. Verified in this build against the official RFC 6238 Appendix B test vectors (SHA-1, SHA-256 and SHA-512, at three timestamps each) before shipping.
- Fully local: the secret and every code computed from it stay in this tab's memory only. Nothing is written to storage and no network request is ever made by this page.
- Use it for: confirming a setup key works before you commit to it, generating a code when you're mid-setup and the app hasn't scanned the QR yet, or testing a TOTP integration you're building.
- Think twice before pasting a real, high-value secret (banking, email, your password manager) into any web page, including this one — not because this page phones home (it doesn't), but because the safest secret is one that only ever touched your authenticator app. For test accounts and low-stakes 2FA this is fine.
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 time | Counter | 8-digit code | 6-digit code |
|---|---|---|---|
| 59 | 1 | 94287082 | 287082 |
| 1111111109 | 37037036 | 07081804 | 081804 |
| 1111111111 | 37037037 | 14050471 | 050471 |
| 1234567890 | 41152263 | 89005924 | 005924 |
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.