TOTP / HOTP Tester

100% Client-Side
Privacy: 100% Client-Side. Your data never leaves this browser tab. Processing uses Web APIs and client-side libraries only.

Test MFA one-time passwords: TOTP (RFC 6238) and HOTP (RFC 4226) codes, otpauth:// URIs and QR codes, drift-window verification and secret-strength checks — 100% in-browser.

Test one-time passwords for MFA: HOTP (RFC 4226) and TOTP (RFC 6238). Paste an otpauth:// URI from a QR code or build one, then compare the codes with what an authenticator app shows. The secret stays in this tab.

  • OKThe secret is 160 bits.

Scan with an authenticator app to compare codes.

otpauth://totp/Example:alice%40example.com?secret=GEZDGNBVGY3TQOJQGEZDGNBVGY3TQOJQ&issuer=Example

Codes

This is the RFC 6238 test secret. Click "New 160-bit secret" for a real one.

Verify a code

A server must also refuse a code that was already used (RFC 6238 §5.2), which this page can't check.

What are TOTP and HOTP?

HOTP (RFC 4226) derives a short numeric code from a shared secret and a counter using HMAC. TOTP (RFC 6238) replaces the counter with the current 30-second time step, which is what most authenticator apps show.

Apps receive the secret through an otpauth:// URI, usually as a QR code. This tester builds and reads those URIs, shows the codes your server should accept, and flags settings that break real apps, such as non-SHA-1 algorithms or 8 digits that some apps ignore.

How to use this tool

  1. Generate a 160-bit secret, or paste an otpauth:// URI and click Load.
  2. Scan the QR code with an authenticator app and compare its code with the current code here.
  3. Paste a code under Verify to see whether it matches and how many steps of clock drift it has.

Frequently asked questions

Is the secret sent anywhere?

No. Codes are computed in your browser with HMAC, and the secret is kept in memory only: it isn't saved or shared.

Why don't my app's codes match?

Check the device clock first, then the algorithm, digits and period: several popular authenticator apps ignore anything but SHA-1, 6 digits and 30 seconds.

How long should a TOTP secret be?

RFC 4226 requires at least 128 bits and recommends 160 bits (32 Base32 characters). The tester generates 160-bit secrets.