2FA Code Generator

Enter your secret key or otpauth link to generate a TOTP code.

Runs in your browser. The key you paste and the codes it produces are not sent to the server. Security notes

TOTP TOOLLocal processing

Use an existing setup key (spaces and hyphens are OK), or try the demo.

Use a QR image

Choose a PNG, JPEG or WebP image up to 8 MB. The image is read in your browser.

Advanced settings

Use the settings supplied by your service. Authenticator apps may not support every option.

Add a setup key to generate a code.

Your result will appear here

What is a TOTP code?

TOTP stands for time-based one-time password. Most authenticator apps show a short numeric code that changes at regular intervals, commonly every 30 seconds. A TOTP generator needs the secret key originally shared during setup and a reasonably accurate clock.

An SMS verification code is different: you cannot reproduce an SMS code using this tool. A backup or recovery code is also not a TOTP secret.

Protect your secret key

The setup key is more sensitive than a single generated code because possession of that key can allow future codes to be calculated. Keep otpauth links and setup QR images private. Avoid copying them into chats, tickets, shared screenshots, or browser extensions.

For day-to-day use, a trusted authenticator app or security key is usually more convenient. This page is intended as a simple utility for people who already control their setup details.

If your code is not accepted

Check that you opened the correct account, your device clock is accurate, and you are using the original setup secret. A code can expire as you type it: wait for a new time window when the countdown is nearly finished.

If you replaced your phone or lost the original setup key, use the service’s official recovery options. Generating numbers from a different key will not restore your account.

What this online 2FA tool cannot do

It cannot recover a missing secret, access your accounts, generate a valid code without the matching key, or bypass a website’s two-factor authentication. It also cannot verify a code with Facebook, Google, or another service on your behalf.

Technical sources