How to use TOTP Code Generator
- Enter a Base32 test key, or paste an otpauth://totp test URI. A supplied URI replaces the manual key, algorithm, digit and period settings.
- For manual input, choose the test’s HMAC algorithm, six/eight digits and 15–120-second time step.
- Enter a whole Unix second for a repeatable test, or leave it blank for a snapshot from this device clock. Read the code and its validity bounds.
- For an opt-in live test, leave Unix time blank and use Start live test with a test key. Stop and clear, input changes or reset stop the panel. Use a dedicated authenticator for real account sign-in.
Example: TOTP Code Generator
Reproduce the RFC 6238 SHA-1 test at Unix time 59, with eight digits and a 30-second step.
Options
- Base32 test key
- Testing only. Use a dedicated authenticator for account sign-in. No key is stored; reset clears this form.
- otpauth TOTP test URI (optional)
- Replaces the key, algorithm, digits and period fields. TOTP only; duplicate parameters and HOTP are refused. No QR image is uploaded.
- Account HMAC algorithm
- Choose SHA-1, SHA-256, SHA-512.
- Code digits
- Choose 6, 8.
- Time step (seconds)
- The initial value is 30.
- Unix time for a test (blank uses now)
- A whole UTC epoch second. The result is a snapshot, not an auto-refreshing authenticator.
- Include previous and next test-step codes
- Adds the neighboring time-step codes to the test report when their times are in range. These are test snapshots, not a broader account acceptance window.
Supported inputs and limits
- Base32 test keys decode to 10–128 bytes.
- Supports HMAC-SHA-1/256/512, six or eight digits and 15–120-second steps, using Web Crypto on HTTPS or localhost.
- A supplied TOTP URI overrides manual settings;
- HOTP and duplicate/unsupported URI parameters are refused.
- Adjacent-step codes are optional test outputs, not an account acceptance policy.
More details
Live mode needs blank Unix time and stops on input changes or reset.
No account request, enrollment, key storage/export or recovery method is provided.
Where your input is processed
This tool does not upload your inputs. See the limits for anything saved on your device.
A correct test code does not enrol an account
The tool calculates from a key and settings you supply. It does not contact an account provider, register a second factor, verify your identity or store a recovery method. The public example key is for testing only and must never protect an account. A real key allows others to reproduce its codes.
Investigate clock and settings before changing the key
A rejected code can come from a device-clock difference, wrong digit count, different algorithm or an expired snapshot. Match the test settings and check device time. The opt-in live panel follows the current device clock and stops when inputs change. It stores no key and does not enroll an account or replace a managed authenticator.
Questions about TOTP Code Generator
Does the code refresh automatically?
Generate returns a snapshot. With blank Unix time, Start live test opts into a code panel and countdown; Stop and clear, input changes or reset stop it. Use a dedicated authenticator for account sign-in.
Can I use any settings with my account?
No. They must match the account’s configured secret, algorithm, digit count and time step.
Is my secret saved?
The tool does not save or export it. Clear the input when finished and use a trusted device.