This is a code generator for the Time-based One Time Password (TOTP) algorithm.
This is a code generator for the Time-based One Time Password (TOTP) algorithm.
This is a code generator for the Time-based One Time Password (TOTP) algorithm. It's intended for developers of web applications with TOTP support to quickly generate codes for testing purposes. It's not meant to be a general purpose authenticator app.
What this tool can do:
What this tool can't do:
To start, simply type or paste in the TOTP secret key. This should be in the standard base32 format. This will generate 6-digit TOTP codes that update every 30 seconds using the SHA-1 algorithm that's used by default in all major authenticator apps.
You can press "show advanced settings" to adjust the TOTP parameters to use non-default values.
The generated codes are displayed in chronological order. The current code is shown in large text. The codes above are past codes, and the codes below are future codes.
The settings are stored in the URL hash. You can bookmark the page or copy the link to go directly to a certain configuration.
Time-based one-time password (TOTP), defined in RFC 6238, is based on the HMAC-based one-time password (HOTP) algorithm, which uses the common HMAC construction based on the current time. TOTP requires the following inputs:
The algorithm is as follows:
Express as Python code, the last 3 steps would look like:
i = h[-1] & 0xF
y = (
(h[i + 0] & 0x7F) << 24 |
(h[i + 1] & 0xFF) << 16 |
(h[i + 2] & 0xFF) << 8 |
(h[i + 3] & 0xFF)
)
code = str(y % 10**d).rjust(d, '0')
To avoid clock synchronization issues, most implementations will accept TOTP codes from the window before and after the one based on the current time. This tool lets you see the previous and next codes to help you debug.
For security reasons, this website will NEVER serve ads. Unfortunately, servers and domains are not free, though I try to be as economical as I can. I would rather lose money running this public service than serve ads or shut it down, but if you would like to help me offset the costs, feel free to send some money my way on: