DataToolsLab
Security & Crypto Tools

TOTP Generator & Verifier

Generate and verify time-based one-time passwords (RFC 6238).

Loading tool…

What is TOTP?

A TOTP tool compatible with authenticator apps: it derives the current time-based one-time password from a Base32 secret and verifies codes.

How it works

The secret is Base32-decoded, the time counter is HMAC-SHA1-signed via Web Crypto, and the dynamic truncation yields the 6/8-digit code.

  1. Enter your input. Type or paste your input into the field above — the tool responds instantly.
  2. Review the result. Output updates live as you type. Everything runs entirely in your browser.
  3. Copy or download. Use the Copy button to grab the result, or Download to save it as a file.

Examples

Verifying a 2FA code

Paste a TOTP code from your authenticator app and verify it against a shared secret — or generate the current code yourself.

Common mistakes

Clock drift breaks codes

TOTP codes are time-based — if the device clock is off by more than a step, codes fail. Check device time sync.

Frequently asked questions

What is TOTP?

Time-based One-Time Password — a code derived from a shared secret and the current time, rotating every 30 seconds by default.

Should the secret be shared?

No — treat it like a password. It's exchanged once during setup (often as a QR code) and kept secret after.

Online