9314JIUsi
Developer tools · Two-factor auth

TOTP codes: paste the secret, read the code

RFC 6238 implementation with a 30-second countdown ring, otpauth:// link parsing and a self-drawn QR code - Google Authenticator compatible.

GATE HALL RFC 6238 · RFC 4648 Base32 · WebCrypto HMAC
Secret & parameters

The secret never touches disk: refresh clears it; only algorithm/digits/period preferences are stored locally.

Current code
Paste a secret on the left
Time step
Code swaps when the ring empties
Refreshed 0 times this step

Algorithm self-test (RFC 6238 Appendix B official vectors)

Secrets and codes are computed inside this device's browser only - nothing is uploaded, nothing is collected, and it works offline; the secret is never written to localStorage (refresh clears it), only algorithm/digits/period preferences are stored locally and "Clear my data" in the footer removes them. On shared computers, use and leave - do not leave secrets sitting in the input box.

Three steps to a code

  1. PasteDrop the Base32 secret from your binding page into the left (spaces and lowercase are cleaned up), or paste an otpauth:// link directly.
  2. ReadThe current 6-digit code appears instantly; the ring counts down the seconds left in this step and the code swaps automatically.
  3. Add phoneScan the QR or copy the otpauth link into a phone authenticator; run the RFC test vectors first if you want extra certainty.

Parameters and boundaries

InputBase32 secret (RFC 4648, A-Z and 2-7; spaces/hyphens stripped and uppercased automatically); or a full otpauth://totp/... link
Output6- or 8-digit numeric code (refreshed each step); otpauth:// binding link + self-drawn QR code (local canvas, no libraries)
Key parametersSHA1 / 6 digits / 30 seconds by default (Google Authenticator's exact setup); switchable to SHA256, 8 digits, 60 seconds; ?digits=8&algorithm=SHA256&period=60 deep-links directly
ProcessingBrowser-local WebCrypto HMAC - no uploads, no accounts; the secret never touches disk (refresh clears it), preferences in localStorage (nothing written on first load)
LimitsSecret up to 512 characters (Base32); otpauth link up to 1024 characters (QR capacity)
Known limitsNo SHA512 and no Steam character set; no HOTP counter mode; no server time check (your device clock is the reference - a skewed clock produces wrong codes); not a replacement for a proper authenticator app in daily use

FAQ

Is this compatible with Google Authenticator?

Yes. The page implements RFC 6238 exactly: SHA-1 hashing, 6-digit codes, 30-second periods - the same parameters as Google Authenticator, Microsoft Authenticator, 1Password, Aegis and every mainstream app. The same secret must produce the same code here and on your phone; if it does not, check that the secret was copied in full (compare the Base32 string with spaces stripped), that the algorithm was not switched to SHA-256, and that the period was not switched to 60 seconds.

Is it risky to paste my secret here? Does it get uploaded?

Nothing is uploaded: all computation happens inside this device's browser, there is no upload endpoint, and codes generate fine offline. One extra safeguard matters more: the secret never touches disk - the page does not write it to localStorage, and refreshing clears it; only the algorithm/digits/period interface preferences are stored locally. Even so, do not paste production account secrets on shared computers - use and leave.

What is an otpauth:// link for?

It is the universal binding link used by authenticator apps: otpauth://totp/label?secret=KEY&algorithm=SHA1&digits=6&period=30 packages the secret and its parameters into one scannable URI. Paste it into the left side of this page and the fields fill themselves; conversely, fill a secret and the page builds the link plus a QR code your phone camera can add directly. The secret inside is plaintext Base32 - forwarding the link hands someone your password.

The ring finished but the code did not change - is it stuck?

It is not stuck; the time step has simply not rolled over. TOTP works in 30-second steps: the instant the ring completes, the code refreshes and the ring resets. If you watch at the exact boundary you may catch the ring going from full to full - normal. If a code stays frozen far longer than one full period, refresh the page; if it still misbehaves, the browser is throttling background timers (a common mobile power-saving trick) and it recovers once the tab is foregrounded again.

How can I verify this tool computes correctly?

The RFC 6238 Appendix B official test vectors are built in: with the secret 12345678901234567890 at time T=59, the SHA-1 8-digit code must be 94287082. Click Run test vectors and all seven rows - six SHA-1 plus one SHA-256 - are compared one by one; anything short of all green does not count. An answer sheet shipped with the standard itself beats any "I used it and it felt fine".

Related tools