OTP Generator
Generate one-time passwords for authentication.
Generate one-time passwords in two ways. Authenticator (TOTP) mode shows the current 6, 7 or 8-digit code for a Base32 secret, exactly as Google Authenticator, Microsoft Authenticator or Authy would, with a countdown to the next code, and gives the otpauth:// link for adding it to an app. Random codes mode makes batches of one-time codes (digits, or letters and digits without look-alikes) using your browser's cryptographic random generator.
Paste the secret from a 2FA setup screen, or use the random one generated for you.
Current code
––– –––
Changes in 30s
Codes follow RFC 6238 and match Google Authenticator, Authy and 1Password for the same secret. Only test with secrets you control; anyone with the secret can generate your codes.
Common use cases
- Test two-factor login while developing an app
- Check that a server and an authenticator app agree
- Make a batch of single-use voucher or backup codes
How to use
- Choose Authenticator (TOTP) or Random codes.
- For TOTP, paste the secret and set the digits, period and algorithm.
- Copy the current code or the generated codes.
FAQ
Why doesn't my code match the app?
Check the device clocks: TOTP codes depend on the time, and a difference of more than about 30 seconds breaks them. Also check the digits, period and algorithm.
Is it safe to paste a real 2FA secret?
It never leaves your browser, but anyone who sees the secret can make your codes. Use test secrets when you can.
Related tools
- UUID GeneratorGenerate random UUID/GUID values for unique identifiers.
- NanoID GeneratorGenerate compact, URL-friendly unique IDs.
- JWT DecoderDecode JWT headers and claims, check expiry, and verify HS256, HS384 or HS512 signatures in your browser.
- Bcrypt GeneratorGenerate bcrypt password hashes with configurable rounds.
- Scrypt GeneratorGenerate scrypt key derivation hashes.
- JWT Signer DemoCreate signed JSON Web Tokens for testing: write the claims, pick HS256, HS384 or HS512, add an expiry, and…
- Random Password GeneratorIn Generators
- Random Username GeneratorIn Generators