Runs locally · no upload

2FA Code Generator

Get your 6-digit 2FA code instantly. Paste the secret from your authenticator setup and read the code - nothing leaves your device.

  • Secret never leaves your browser
  • Nothing you paste is uploaded
  • Works instantly, no signup

Last updated: Oct 21, 2026 15:48:23

Generate a one-time code

Waiting for a key

Computed in your browser: the secret is not uploaded and not stored. The page makes one analytics request and nothing else.

A 2FA code is the six digits an authenticator app shows when you log in: it proves you have the second factor, not just the password. This page generates that code from the setup key, inside your browser, so you can sign in on a device that has no authenticator app installed.

It is the same maths your phone does. If your phone is lost, wiped, or simply in another room, the digits here are identical — provided the key and the timing are right. That “provided” is what this page is mostly about.

What a 2FA code actually proves

Your password proves something you know. A 2FA code proves something you have — the shared secret that was issued when you enabled two-factor authentication. The service stores a copy; your phone stores a copy; the code is the proof that both copies agree.

That is why a code is short-lived. It is derived from the current time, so it is only meaningful for one 30-second window. An attacker who sees it has at most half a minute to use it, and only if they also have your password.

Password 2FA code
Proves Something you know Something you have
Lifetime Until changed 30 seconds (typically)
Reusable Yes No
If leaked Account compromised until you change it Almost useless after the window

How to get your code in four steps

  1. Find the setup key. During 2FA setup, choose “Can’t scan the QR code?” or “Enter setup key manually”. You will see a string like JBSWY3DPEHPK3PXP. If 2FA is already enabled and you no longer have the key, read how to find your 2FA key.
  2. Paste it in the field at the top of this page. A raw key works, and so does the full otpauth:// link if the service gave you one.
  3. Read the six digits. They refresh automatically when the timer resets. The progress bar shows how long is left; in the last five seconds it turns orange.
  4. Type them into the login form immediately. If the code changes while you are typing, delete it and use the new one — do not submit a code that has already rotated.

Six digits, eight digits, or something else

Nearly every consumer service issues six digits over a 30-second window. Exceptions worth knowing about:

If you do not know which variant a service uses, the setup link usually tells you: otpauth://totp/…?digits=8&period=60&algorithm=SHA256. Pasting the whole link sets all four parameters at once.

Five ways a correct code still gets rejected

  1. You copied the whole link as a key. That is fine here — the page parses otpauth:// automatically — but if you paste it into an app’s “secret” field, it will fail. Use the raw Base32 part there.
  2. A character was mangled. The digits 0, 1 and 8 do not exist in Base32. If your key contains them, it did not come from the setup screen.
  3. Spaces or dashes were kept. Harmless on this page (they are stripped), fatal in some apps.
  4. The code expired while you typed. The most common one. Watch the bar, not the digits.
  5. The device clock is wrong. A difference over ~30 seconds makes every code fail, forever, no matter how carefully you type. This is the first thing to check when nothing else explains it.

Which situation are you in?

Situation What to do
Phone nearby, app installed Use the app. This page is for when the app is not available.
Phone lost or broken Use backup codes first. They are single-use and work without any device.
New device, setup key at hand Paste the key here and sign in, then re-enrol the new device properly.
No key, no app, no backup codes Account recovery through the provider is the only route. Nothing on this page can help without the key.
Code rejected despite correct key Work through 2FA code not working before resetting anything.

If the service insists on its own app

A few banks and enterprise portals tie the second factor to their own application and will not accept a code from anywhere else — sometimes they check the app’s attestation, sometimes the code is not TOTP at all. Signs that you are in this situation:

In that case the account’s recovery route is the only path: a registered device, a branch visit, or support with identity documents. A generator cannot substitute for a proprietary factor.

Is this page a replacement for an authenticator app?

For an emergency, yes. For daily use, no — and the reason is practical rather than technical:

This page Authenticator app
Stores your accounts No — the key is lost when the tab closes Yes, encrypted on the device
Needs the key each time Yes No
Works offline Yes, once loaded Yes
Risk of the key leaking You type it on a page; verify no requests, then trust Depends on the app’s own practices
Good for New device, lost phone, verifying parameters Everyday logins

The right sequence is usually: use this page to get back in, then set up the authenticator properly on the new device, save the backup codes, and stop keeping the secret anywhere it does not belong.

What happens to your key here

Nothing leaves the tab. Concretely:

A page that asks for your 2FA secret is asking for something that can impersonate you indefinitely. Any site that cannot demonstrate it is running locally deserves suspicion — including this one, until you check the Network panel yourself.

After you sign in

Generating a code here solves the immediate problem; it does not fix the device situation. Once you are back in:

  1. Save the new backup codes somewhere you can reach without the phone (printed, or in a password manager).
  2. Re-enrol the new device as a proper authenticator entry — see how to set up 2FA.
  3. Remove the old device from the account’s trusted-device list.

If you want to understand the machinery behind the digits, start with what TOTP is; if a code still will not work, the troubleshooting page covers the eight causes in order of likelihood.

Frequently asked questions

Where do I find my 2FA key?

During setup, choose "Can't scan the QR code?" or "Enter setup key manually". The Base32 string shown there is the key. If 2FA is already enabled, check the security settings of the account or decode the QR code with a reader that shows raw text.

How long is a 2FA code valid?

Typically 30 seconds. Some services accept the previous and next step as well, which effectively widens the window to about 90 seconds.

Why is my 2FA code not working?

Most often the clock is off, the code expired while being typed, or the service expects 8 digits or a different algorithm. Work through the causes in order before resetting anything.

Can I use this page on my phone?

Yes. It is a normal web page and works in any modern mobile browser; no app or account is required.

Is it safe to enter my key here?

The key never leaves the tab. A Content-Security-Policy limits outbound connections to this site plus one analytics host, and nothing is stored; open the Network panel to confirm your key is never sent.

What if I do not have the key or the app?

Only the account's own recovery route can help - backup codes, a signed-in session, or provider support. A generator needs the key to produce anything.