2FA Code Generator
Enter your secret key or otpauth link to generate a TOTP code.
Use an existing setup key, or try the demo.
Advanced settings
Use the settings supplied by your service. Authenticator apps may not support every option.
Your result will appear here
Your setup key stays in this tab. Read the security notes
Generate a 2FA code.
Add your setup key
Use the secret key or setup link provided by your account.
Check your settings
Match the algorithm, code length and time period to your service.
Copy the current code
Use it before the timer ends. Clear your key when you finish.
More 2FA tools for your next task.
Choose a tool for a code, QR image, or setup link.
HOTP generator
Create a counter-based code with the settings you choose.
Open SETUP2FA QR code generator
Build an authenticator QR code from your setup details.
Open DECODE2FA QR code reader
Read an authenticator QR image locally in your browser.
Open VALIDATEotpauth URI validator
Inspect a setup link and check its parameters.
OpenBefore you use
an online authenticator.
A setup key can generate future codes. Keep it private, just as you would a password.
Need a hand?How to generate a code
Paste the setup key provided when you enabled two-factor authentication. If your service supplied an otpauth link, paste the complete link so the tool can read its settings.
- Match the algorithm, code length, and period to your account settings.
- Copy the current code and enter it on the service where you are signing in.
- Use Clear when you have finished.
Your setup key needs careful handling
A setup key can generate future codes. Treat it like a password: do not share it, include it in a screenshot, or paste it into a public support message. A dedicated authenticator app is a better choice for everyday account storage.
Why a code may be rejected
Check the setup key, your device time, and the code settings. If the timer is almost finished, wait for a fresh code. Repeated failures can also mean the account has a different or replaced key.
What this tool can do
This tool calculates a code from the key you supply. It cannot recover a lost key, bypass two-factor authentication, or tell whether a service will accept a code.