TOTP: a code that follows the clock
TOTP stands for time-based one-time password. Its calculation combines a shared secret with a time-derived moving value. Many consumer authenticator apps use a 30-second period, so the displayed code changes as the countdown completes.
The verifier needs compatible parameters and a sufficiently synchronized clock. A TOTP value may be mathematically valid for its key but rejected when the service is configured with a different key, algorithm, number of digits, or time window.
HOTP: a code that follows a counter
HOTP stands for HMAC-based one-time password. Instead of time, it uses a counter that advances according to the application’s rules. The generator and verifying service need to stay in sync with that counter.
Pressing generate with a larger counter on a test tool does not advance the counter held by a remote website. On a live account, guessing or skipping counters can make troubleshooting harder.
TOTP versus HOTP at a glance
TOTP normally changes when a time interval passes. HOTP changes when its counter value changes. Both require the correct secret and configuration, and both can use HMAC-based algorithms. Neither one can restore a key that has been lost or replaced.
- Moving factor: current time window for TOTP; stored counter for HOTP.
- Typical use: consumer authenticator sign-ins often use TOTP; counter-based systems may use HOTP.
- Setup: use the type and parameters configured by the service, not a preferred default.
Which online generator should you use?
Use the time-based 2FA code generator for an existing TOTP setup and the HOTP generator only when you know the relevant counter-based configuration. An otpauth://totp/ link indicates a time-based setup; an otpauth://hotp/ link indicates a counter-based setup.
If you are unsure what your account uses, check the service’s enrollment instructions. Do not experiment with random live-account secrets or counters.
A note about recovery and security
TOTP and HOTP produce authentication codes; they do not replace a service’s account recovery process. Store the original enrollment information in an appropriate secure location and avoid sharing setup links or QR images. A browser-based test generator is not a substitute for a well-managed daily authenticator.