2FA code generator

2FA code generator (TOTP)

Paste a setup key from any site that supports authenticator apps and get the current 6-digit code, plus the next one. Works for Discord, Epic Games, Roblox, Google, and more.

The code is made in your browser. Your key is never sent or saved, and it is gone when you close this tab.

Current code

Paste a key above to see the code.

How to get a code from a setup key

  1. On the site, turn on two-factor authentication and choose the authenticator app option.
  2. Under the QR code, look for a link like “Can’t scan the code?” or “Enter a setup key”. It shows a key of letters A–Z and numbers 2–7.
  3. Paste that key above. Type the 6-digit code back into the site to finish turning 2FA on.
  4. Save the key and the backup codes somewhere safe. This page forgets the key when you close it.

The key is the whole secret. Anyone who has it can make your codes, so keep it as carefully as the password. The LoginScout authenticator stores it encrypted on your device, on the same card as the login.

Steam Guard works differently

Steam Guard codes are five characters of letters and numbers, not six digits, and Steam does not show a standard setup key. That means no ordinary TOTP generator, including this one, can make Steam Guard codes. Use the Steam mobile app.

Lost the phone with Steam Guard on it? Follow the steps in how to get back into Steam without your authenticator.

Is an online 2FA code generator safe?

This one computes codes locally with your browser’s built-in cryptography. Nothing leaves the page. Even so, a web page is a tool for a moment, not a home for your keys:

  • Use it to finish a setup, test a key, or get in when your phone is away.
  • For accounts you care about, keep the key in an authenticator app or an encrypted vault.
  • Never paste a key someone else sent you. “Here is the 2FA for the account you bought” is a common scam: the seller keeps a copy and takes the account back.

How TOTP codes work

When you turn on 2FA, the site and your authenticator share one secret key. Every 30 seconds, both sides mix that key with the current time using a hash (HMAC-SHA1 in almost every case) and keep 6 digits of the result. If your digits match the site’s, you are in.

That is why codes need an accurate clock, why they expire so fast, and why the same key gives the same code in any app. It is also why a stolen key is as bad as a stolen phone.

2FA code questions

Why is my 2FA code not working?
Check your device clock first. Codes change every 30 seconds, so a clock that is off by a minute gives wrong codes. Then check that you pasted the whole key, and that the site uses a standard authenticator app rather than its own, like Steam Guard.
Is this the same as Google Authenticator or Microsoft Authenticator?
It uses the same open standard, TOTP (RFC 6238). The same setup key gives the same code here, in Google Authenticator, in Authy, and in the LoginScout vault.
Does this site save my setup key?
No. The key stays in this browser tab. It is not sent to LoginScout, not stored in cookies or local storage, and it is gone when you close the tab.
Can I get my 2FA codes without my phone?
Only if you saved the setup key or the backup codes when you turned 2FA on. With the key, you can make codes here or in any authenticator. Without either, use the site’s account recovery.
What is an otpauth:// link?
It is what a 2FA QR code contains: the setup key plus the account name, digits, and time period. Paste the whole link here and the settings fill themselves in.

Keep the login, not just the idea

LoginScout is a private vault for gaming logins. Keep every Steam, Epic, Roblox, and Riot account with its password, 2FA codes, and recovery notes, encrypted on your device. Free for 5 accounts.