Skip to main content
Calctrove Calctrove

2FA Code Generator (TOTP)

2FA Code Generator (TOTP)

Generate current authenticator OTP codes for dev/test flows with configurable digits, period, and algorithm.

Settings

More actions
6 digits
30s period

Current code

------

Code refresh in 0s.

Flow
  • Decode Base32 secret into raw key bytes.
  • Compute moving counter from current time and period.
  • Apply HMAC + dynamic truncation and reduce modulo 10^digits.
Example

Worked example: 30-second 6-digit code

  1. 1 Set secret to a valid Base32 value.
  2. 2 Choose digits=6, period=30s, algorithm=SHA-1.
  3. 3 Tool computes current code and shows seconds remaining.

A valid time-based OTP code is displayed and refreshes by period.

How
  1. Paste a Base32 secret key in the input field.
  2. Choose digits, period, and algorithm options.
  3. Generate current code and monitor countdown refresh.
Cases
  • Test 2FA login flows in staging environments.
  • Verify otpauth configuration matches expected OTP output.
  • Debug authentication integrations without external authenticator apps.
Avoid
  • Using non-Base32 characters in the secret.
  • Expecting identical codes when local clock is out of sync.
  • Assuming this tool verifies account enrollment automatically.
FAQ
Does 2fa code generator (totp) send my input to a server?

No. 2FA Code Generator (TOTP) handles the input in your browser whenever possible, so routine conversions, previews, and copy actions stay on your device instead of being sent to Calctrove servers.

Can I generate 8-digit OTP codes?

Yes, choose 8 digits in the options panel.

Which algorithms are supported?

SHA-1, SHA-256, and SHA-512 are supported for dev/test scenarios.

Switch
Switch12