# TOTP Generator

Generate the current two-factor code for a TOTP or HOTP secret, check a code you received, and get the otpauth URI with a QR code you can scan into an authenticator app. Leave the secret empty to create a new random one for testing your own 2FA setup.

## Frequently asked questions

### What is TOTP?

Time-based One-Time Password, defined in RFC 6238, turns a shared secret and the current time into a short code that changes every 30 seconds. Authenticator apps such as Google Authenticator, Microsoft Authenticator, Authy and 1Password use it for two-factor sign-in.

### What is the difference between TOTP and HOTP?

HOTP, defined in RFC 4226, counts events instead of time: each code belongs to a counter value that increases after every use. TOTP is HOTP with the counter taken from the current time divided by the period. Choose HOTP and enter the counter to compute counter-based codes.

### Which secret format is expected?

A Base32 secret as authenticator setups show it, for example JBSWY3DPEHPK3PXP. Spaces and dashes are ignored. The secret must decode to at least 10 bytes. If you leave the field empty, the tool creates a random 20-byte secret.

### What is the otpauth URI and the QR code for?

The otpauth URI carries the secret, issuer, account, algorithm, digits and period in the format authenticator apps understand. The QR code contains the same URI, so scanning it adds the account to an app. Include an issuer and account name to label the entry.

### How does verifying a code work?

Enter a code in the verify field and the tool checks it against the current time step and one step before and after, the usual tolerance for clock drift. For HOTP only the given counter is checked.

### Is it safe to enter a real secret?

The secret is used for this one request and not stored, and the result does not echo the input field. Still, a 2FA secret is as sensitive as a password: anyone who has it can generate your codes. Use this tool for testing and development rather than for secrets of accounts you rely on.

Your ad here?

[Email us](mailto:hi@dennn.is?subject=Advertising%20on%20OneClick%20Pro)

[Ad 433 tools for your AI agents through one MCP server.](https://multitaskai.com/?ref=oneclickpro)
