DexTools

TOTP Code Generator

Generate the current six or eight digit authenticator code from a base32 secret, with the seconds remaining in the window.

Nothing leaves your browser Dex Secure

Secret

Current code

Paste the secret an authenticator app would ask for. It is decoded in the tab and never transmitted.

TOTP per RFC 6238 with a 30-second window, computed from your device clock. A clock that is a minute out produces the wrong code, which is the usual reason a code is rejected.

Save to DriveInsert into Office

Saving needs a Dex account. The tool never does.

How it works

  • Paste the base32 secret that an authenticator app would ask for. The current code appears with a countdown to the end of the thirty-second window and refreshes itself.
  • The calculation is RFC 6238: an HMAC-SHA1 over the counter value, truncated to six or eight digits. It is the same algorithm every authenticator app uses.
  • The otpauth URI is shown so the same secret can be moved into a real authenticator app, or scanned from the QR generator.
  • The secret is decoded and used in the tab. It is never transmitted, which is the reason this is safer than the websites that ask you to paste a two-factor secret.

Examples

Recovering access when the phone is gone

If you kept the setup secret, paste it here to get the current code and sign in before rotating the factor.

Testing a server implementation

Set the window and compare the code against what your backend produces for the same timestamp. A mismatch usually means a clock or encoding problem.

Frequently asked questions

Why does my code not match the app?

Almost always a clock difference. TOTP is derived from the current time, so a device a minute out produces a code for a different window.

Is it safe to paste a two-factor secret here?

The secret stays in the page and is never transmitted, but it is a credential: anyone who has it can generate your codes. Avoid keeping it in a shared tab.

Does it support SHA-256 or SHA-512 TOTP?

Not yet. The tool implements the SHA-1 variant, which is what authenticator apps default to and what nearly every service issues.

Can I scan a QR code instead?

Use the QR generator to make an otpauth URI, or read the secret out of an existing QR and paste it here.