2FA Code Generator
Paste a 2FA secret key to get a live 6-digit code for logging in to Facebook, Instagram, X and other accounts with two-factor authentication.
e.g. JBSW Y3DP EHPK 3PXP; spaces are ignored
Your key is processed only in your browser. It is never uploaded or saved, and it's gone when you refresh or close the page.
How to use
-
01
Copy the key
Find the account's 2FA secret key, the string of letters and digits shown when two-factor was turned on, or copy the whole account line.
-
02
Paste it in
The 6-digit code appears right away. Keys inside a full account line are detected automatically.
-
03
Enter it in time
The code changes every 30 seconds. Type the digits shown into the login page's code box.
What is a 2FA code?
2FA (two-factor authentication) adds a second check on top of your password. Once it's on, logging in also asks for a 6-digit number. That number is calculated from your 2FA secret key and the current time using the TOTP standard (RFC 6238), and it changes every 30 seconds. Authenticator apps such as Google Authenticator and Microsoft Authenticator use the same algorithm, so the same key gives the same code here and in the app.
FAQ
The code is rejected. What should I do?
Most often the device clock is off. Codes depend on the current time, so a difference of more than 30 seconds breaks them. Turn on automatic date and time in your system settings and try again. Also check that the whole key was copied, and submit before the countdown ends.
What does a 2FA secret key look like?
Usually 16 or 32 uppercase letters and digits, using only A–Z and 2–7, sometimes split into groups of four by spaces. In a full account line it is usually the last part, for example "login----password----email----2FA key".
Is this tool safe to use?
Codes are calculated entirely in your browser. The page never sends your key to any server and never stores it. Even so, a 2FA key is the second key to an account: don't share it, and don't type it into sites you don't trust.
Which platforms does it work with?
Any two-factor setup that uses standard TOTP with 30-second, 6-digit codes, including Facebook, Instagram, X (Twitter), Google and Microsoft.
Facebook UID Check & 2FA Verification Guide Facebook FAQ All tools