TOTP 2FA code generator

Paste a 2FA secret key or upload a screenshot of the QR code. You get the current TOTP code with a countdown, just like Google Authenticator, plus a check that your two-factor setup is right.

Codes are computed in your browser only. The page stores nothing and never sends your secret anywhere.

Don’t paste secrets from real accounts

A 2FA secret is the second key to an account. This page neither stores nor sends it, but any website is one more place a key could leak. Use the generator for test keys and to check your setup. For everyday logins, keep your codes in an authenticator app on your phone.

Spaces and case don’t matter. Services show the key under the QR code when you turn on 2FA: “Can’t scan? Enter the key manually”.

An image or screenshot. You can also paste it with Ctrl+V.
Settings: algorithm, code length, period
Algorithm
Digits
Period
Current codeEnter a key to see the code here
—

Check your 2FA setup

Enter the code your app (Google Authenticator, Microsoft Authenticator, Authy, etc.) shows for the same key. We’ll compare it with the code on this page.

This device’s clock: checking against our server…

What goes to our server: nothing except one time request to check your clock. The key and codes never leave your browser and aren’t saved — reload the page and they’re gone.

Open-source libraries and licenses

How the generator works

The same maths as Google Authenticator and other 2FA apps, right in your browser.

Key plus time

A TOTP code is derived from the secret key and the current time as defined in RFC 6238. A new code every 30 seconds.

Browser only

The maths runs in your browser’s built-in Web Crypto. The key isn’t sent to a server or written to browser storage.

Clock check

If your app’s code doesn’t match, we show how far your phone clock is ahead or behind.

Test key

Generate a random key with a QR code to test how your app or service handles 2FA.

When it helps

Your app’s code is rejected

Compare the app’s code with ours for the same key and see whether the phone clock is to blame.

Development and QA

Check that your service issues a correct QR and accepts SHA-1, SHA-256 and SHA-512 codes.

Moving to a new phone

Make sure the key you saved works before you delete the old app.

Training

Show colleagues how two-factor authentication works using a test key.

What is two-factor authentication

Two-factor authentication (2FA) means signing in with two independent factors: your password and a code from your device. Even if the password leaks, nobody can sign in without the code.

The most common kind of code is TOTP. An authenticator app (Google Authenticator, Microsoft Authenticator, Authy, 1Password) keeps a secret key and every 30 seconds derives a new code from it and the current time. The service does the same and compares the results.

Why your authenticator code doesn’t work

Most often it’s the phone clock: the code depends on time, and with a gap of more than 30–60 seconds the service rejects it. The second cause is a key from another account, or an old key if 2FA was set up again. Less often the service uses non-default settings: SHA-256, 8 digits or a 60-second period.

Is it safe to enter a key on a website

This page computes codes in your browser and never sends the key to a server — you can confirm that in the Network tab of the developer tools. Still, a 2FA secret equals the second key to an account, so keep real keys only in the app on your phone and use the generator for tests and checks.

TOTP and 2FA FAQ

Yes. The generator uses the same RFC 6238 standard as Google Authenticator, Microsoft Authenticator and Authy. With the same key and an accurate clock, the codes match.

No. The key lives only in the open tab: we don’t write it to browser storage or the URL and don’t send it to a server. Reload the page and the field is empty.

The service shows it when you turn on 2FA: under the QR code there’s a link like “Enter key manually” or “Can’t scan?”. If you saved the QR as a screenshot, upload the image and the key will be read from it.

Better not. The site is handy for checks and tests, but for everyday logins keep keys in an app on your phone so they never sit in a desktop browser.

Your phone or computer clock is probably off. Enter your app’s code in the check field and we’ll show how many seconds the clock is ahead or behind. Turn on automatic time.

These are TOTP settings. Almost all services use SHA-1, 6 digits and a 30-second period. If the QR code carries other parameters, the generator applies them automatically.

Open the developer tools (F12), go to the Network tab and enter a key. No new requests appear. The page’s only request is a time check with our server, and it doesn’t contain the key.

Sign in with the backup codes the service gave you when you enabled 2FA, then link a new device. Without backup codes, recover access through the service’s support.