The secret is used only inside this page, on your device. It is never sent to any server, and nothing is saved. Only enter secrets for accounts that you own.
Spaces and lowercase letters are accepted. Trailing = padding is ignored.
Advanced: check the code at a fixed Unix time
------
Enter a secret to begin.
What a TOTP Code Is
A time-based one-time password is the short numeric code many services request after your password. It is defined in RFC 6238, which builds on the HMAC-based one-time password scheme in RFC 4226. The service and your app share a secret key once, during setup. From then on each side can compute the current code on its own, without contacting the other.
The code depends on three inputs: the shared secret, the current Unix time and a period, usually 30 seconds. The time is turned into a counter by dividing by the period and rounding down. The counter is what gets hashed, so a code stays the same for a whole period and changes at each boundary.
How the Calculation Works
The page runs the standard steps in your browser, using the Web Crypto API for the keyed hash. Nothing leaves the page.
RFC 6238 Test Vectors
RFC 6238 publishes test values so that independent implementations can be compared. The SHA-1 vectors use the ASCII secret 12345678901234567890, which is GEZDGNBVGY3TQOJQGEZDGNBVGY3TQOJQ in Base32. Each value is reproduced by entering the matching secret and algorithm, then setting the advanced fixed time to the Unix time shown.
| Unix time | Algorithm | Digits | Code |
|---|---|---|---|
| 59 | SHA-1 | 8 | 94287082 |
| 59 | SHA-1 | 6 | 287082 |
| 1111111109 | SHA-1 | 8 | 07081804 |
| 59 | SHA-256 | 8 | 46119246 |
| 59 | SHA-512 | 8 | 90693936 |
Matching these values confirms the counter, HMAC and truncation steps. It does not confirm anything about a live account, which depends on the service's own clock and settings.
Frequently Asked Questions
No. The secret is read, decoded and used only inside this page, through your browser's Web Crypto API. The page makes no network requests with the secret, and it does not save it to local storage or cookies. Reloading or clearing the page removes it from the screen.
This page is a calculator for checking codes, testing a service you are building, or learning how TOTP works. For everyday logins a dedicated authenticator app on a separate device is the better home for your codes, because two-factor protection depends on the second factor being kept apart from the password.
The code is computed from a counter equal to the Unix time divided by the period, rounded down. The counter stays the same for the whole period and moves on at each boundary, so the code changes at the same moment for the server and for the device, provided both clocks agree.
It computes the code for a moment you choose instead of the current one. That is useful for matching the RFC 6238 test vectors or for looking into a clock offset. The countdown pauses while the option is in use, and the page shows the time it is using.