Tested tool guide
Tested browser tools
Checked August 16, 2026
What HOTP Code Generator does, with a checked example
HOTP Code Generator turns a shared secret and an explicit counter into the decimal passcode defined by HOTP. It applies HMAC-SHA-1 to an eight-byte counter, dynamically truncates the result, and formats the requested number of digits. The counter is event based, not a timestamp: a correct secret still produces the wrong code when the generator and verifier use different counter values. Because the secret is an authentication credential, enter it only on a trusted device. The calculation runs in the browser, and the secret is not uploaded.
Worked example
A concrete input and expected output from the current implementation.
Input
Secret (Base32): GEZDGNBVGY3TQOJQGEZDGNBVGY3TQOJQ
Counter: 0
Digits: 6
->
The Base32 text decodes to the 20 ASCII bytes 12345678901234567890, the shared secret used in the RFC 4226 test vectors. Dynamic truncation produces 1,284,755,224 for counter 0, and reducing that value modulo 1,000,000 gives 755224.