Skip to content
Free tool

Free 2FA Code Generator

Turn a 2FA secret key or QR code into live login codes, right in your browser. No app, no sign-up, and nothing is sent to our servers.

  • Runs in your browser
  • Erased when you close the tab
  • Free, no account needed

Private session. Your keys stay in this browser tab and never reach our servers. Closing the tab erases them, so keep your own backup of each key.

Ctrl + Enter to add

Keys have 16 or more letters and digits (A–Z, 2–7). Lines like login|password|key work too: only the key and a name are kept.

Your codes

Codes follow this device's clock. If a website rejects a code, check that the date and time are set automatically.

How to get a 2FA code from a secret key

Three steps, and the code is ready before the timer runs out.

  1. 1

    Find your secret key

    When you turn on two-factor authentication, the website shows a QR code. Most also offer a link like “Can't scan it?” that shows the key as text.

  2. 2

    Paste it or scan the QR code

    Paste one key or a whole list, scan the QR code with your camera, or upload a screenshot of it.

  3. 3

    Copy the code and sign in

    Click a code to copy it and enter it on the website. A new code appears every 30 seconds.

More than a basic code generator

What an authenticator app does with your keys, in a browser tab that forgets them when you close it.

  • Private by design

    Codes are made on your device with the browser's Web Crypto API. Keys are never sent to our servers, put in a link or saved in cookies.

  • Gone when you close the tab

    Keys live in this tab's session storage only: a refresh keeps them and closing the tab erases them. Nothing to clean up.

  • Many keys at once

    Paste a whole list, one key per line, including login|password|key lines. Passwords are ignored and never kept.

  • QR codes, any way you have them

    Scan with your webcam or phone camera, upload or paste a screenshot, or import a Google Authenticator export.

  • Every TOTP setting

    SHA-1, SHA-256 and SHA-512, codes of 6 to 8 digits and custom periods, read straight from otpauth links.

  • Next code and QR export

    See the next code before the current one runs out, and show any key as a QR code to move it to your phone.

What you can paste

One key per line, in any of these forms. Only the key and a name are kept.

A secret key
JBSWY3DPEHPK3PXPUpper or lower case, with or without spaces.
A name and a key
GitHub: JBSW Y3DP EHPK 3PXPThe name is shown on the code.
An account line
you@example.com|password|JBSWY3DPEHPK3PXPFields separated by | or :. The key is found and the password ignored.
An otpauth:// link
otpauth://totp/Example:you@example.com?secret=JBSWY3DPEHPK3PXP&issuer=ExampleThe text inside a 2FA QR code, with its own settings.
A Google Authenticator export
otpauth-migration://offline?data=…Every account in it is added at once.

Keep your 2FA keys safe

A 2FA key is as sensitive as a password: whoever has it can make your codes.

  • Save every key, or the backup codes the website gives you, in a password manager. It's your way back in if you lose your phone.
  • Never share a code or a key. Real support teams never ask for them.
  • Use the generator on a device you trust, and close the tab when you're done on a shared computer.
  • Treat it as a handy extra, not as the only place your keys live.

2FA code generator questions

How the generator works, where your keys go and what to do when a code is rejected.

This one runs entirely in your browser. Codes are made on your device with the Web Crypto API, and your keys are never sent to our servers, saved in cookies or shared. As with any authenticator, use it on a device you trust.

Only in this browser tab, for as long as it's open. They're kept in the tab's session storage so a refresh doesn't lose them, and the browser erases them when you close the tab. Clear all removes them sooner.

Codes depend on the time, so a device clock that's off by more than about 30 seconds gives codes the website won't accept. Turn on automatic date and time and try again. Also check that the key is complete and that the digits, period and algorithm match what the website uses.

When you set up two-factor authentication, the website shows a QR code, usually with a link such as “Can't scan the QR code?” or “Enter the key manually” that shows the same key as text. You can also scan or upload the QR code here.

Yes. It follows the same open TOTP standard (RFC 6238) as Google Authenticator, Microsoft Authenticator and most other apps, so the same key gives the same codes. Show a key as a QR code to add it to one of those apps.

Yes, once the page has loaded. Codes are made on your device, so they keep coming without an internet connection.

Yes. Open Advanced options to choose the algorithm (SHA-1, SHA-256 or SHA-512), 6 to 8 digits and the period for keys you paste, or edit a key's settings later. Keys from otpauth links and QR codes bring their own settings.

Yes. In Google Authenticator, choose Transfer accounts, then Export accounts, and scan the QR code it shows with the generator. Every account in that QR code is added at once.

Both prove it's you when you sign in. SMS codes arrive by text message at a phone number, while authenticator codes are made from a shared key every 30 seconds. Many websites use both: TextVerification provides phone numbers for SMS codes, and this generator handles authenticator codes.

Need a phone number for SMS verification?

Many websites ask for a phone number before you can turn on 2FA. Get a real number for SMS codes in seconds, refunded automatically if no code arrives.