⚡
usefultools.dev
⏱️

TOTP Generator: Live 2FA Codes from a Secret (RFC 6238)

NOUVEAU

TOTP generator for testing 2FA: paste a Base32 secret or otpauth URI to see live codes, or create a new secret with QR code. Runs in your browser.

Fonctionne à 100 % dans votre navigateur — vos données ne sont jamais envoyées ni stockées sur nos serveurs.

Cet outil n'est pas encore entièrement traduit : une partie du texte est encore en anglais. L'outil lui-même fonctionne de la même façon dans toutes les langues.

Codes are computed locally with Web Crypto HMAC; the secret is never stored or sent. Codes depend on your device clock being correct.

⚡

Exemples rapides

Des entrées typiques et les résultats produits par cet outil.

TOTP
JBSWY3DPEHPK3PXP at t=59
996554
SHA-1
RFC 6238 seed, t=59, 8 digits
94287082
SHA-256
RFC 6238 seed, t=59, 8 digits
46119246
HOTP
RFC 4226 seed, counter 0
755224
Base32
12345678901234567890 (ASCII)
GEZDGNBVGY3TQOJQGEZD…
📖

Présentation

This TOTP generator shows the same six- or eight-digit codes an authenticator app would show, from a Base32 secret or a full otpauth:// URI. It is built for developers and testers who add two-factor authentication to an app and need to check that server and client agree on the code.

Codes follow RFC 6238 (time-based) and RFC 4226 (counter-based HOTP) with SHA-1, SHA-256 or SHA-512, 6 to 8 digits and a 30 or 60 second period. The tool shows the current code with a countdown ring plus the previous and next codes, which helps when debugging clock drift. It can also create a fresh random secret with a matching otpauth URI and QR code for test enrollment.

HMAC is computed with the Web Crypto API in your browser. Secrets are not stored, logged or uploaded, and on each load the implementation is checked against the official RFC test vectors.

Pourquoi utiliser cet outil ?

  • Check your 2FA server against a known-good generator
  • See previous and next codes to debug clock drift
  • Create test secrets with a scannable QR code
  • TOTP and HOTP, SHA-1/256/512, 6–8 digits
  • Secret stays in your browser, never saved
⭐

Fonctionnalités

⏱️

Live TOTP codes

The code refreshes automatically, with a countdown ring for the current period.

🔢

HOTP counter mode

Step through counter values for RFC 4226 one-time passwords.

🔗

otpauth URI import

Paste an otpauth:// URI and the algorithm, digits, period and issuer are applied.

🎲

Random secret + QR

Generate a 160-bit Base32 secret and its QR code to enroll an authenticator app.

✅

RFC-verified

All 28 RFC 6238 and RFC 4226 test vectors are re-checked in your browser on load.

🔒

Nothing stored

No localStorage, no network calls; the secret is hidden by default.

🛠️

Mode d'emploi

1

Enter the secret

Paste a Base32 secret or an otpauth:// URI, or click "Generate random secret".

2

Match the settings

Pick algorithm, digits and period (TOTP) or counter (HOTP) to match your server.

3

Read the code

Compare the current, previous and next codes with what your app expects.

4

Enroll a test app

Scan the QR code or copy the otpauth URI into an authenticator.

🤔

Questions fréquentes