Facebook 2FA Code Generator
Get a Facebook 2FA code from the secret key Facebook shows during authenticator setup. Paste the key below for the current six-digit code — computed in your browser, no app needed.
Codes are computed in your browser with the Web Crypto API — the key never leaves this page. Only use keys for Facebook accounts you own or are authorized to manage.
Where to find your Facebook 2FA secret key
Facebook shows the authentication-app key only during setup. If you already enabled 2FA with an app, remove and re-add the authenticator method to see it again:
- Open Settings & privacy → Settings, then Accounts Center → Password and security.
- Choose Two-factor authentication and select your Facebook account.
- Pick Authentication app. Facebook displays a QR code.
- Choose “Can’t scan the QR code?” — Facebook reveals the setup key as text (many accounts also see the full
otpauth://URI, which this page accepts as-is). - Copy the key, paste it into the generator above, and enter the code to confirm setup.
The exact menu names shift as Meta updates its interface, but the pattern holds: 2FA settings → authentication app → the “can’t scan” link is always where Facebook exposes the key.
Using the code at Facebook login
With two-factor authentication enabled, Facebook asks for a code after your password. Open this page (or keep it pinned), read the live code, and enter it before the 30-second timer ends. A code that expires mid-typing is the most common cause of a “code incorrect” error — wait for the next one instead of reusing it.
This works identically whether you normally use Google Authenticator, Authy, or another app: they all implement the same RFC 6238 TOTP algorithm, so the codes match for the same key.
Facebook 2FA troubleshooting
- “Code incorrect” with the right key — sync your device clock to automatic and re-check the key character by character; see 2FA code not working.
- Code worked at setup but not at login — make sure you re-added the method after regenerating the key; an old key keeps producing old codes.
- No access to the key at all — use Facebook’s backup codes from setup, or the recovery flow in the Help Center (“I lost my two-factor authentication device”).
Frequently asked questions
How do I get my Facebook 2FA secret key?
Facebook shows the key during authenticator-app setup: Settings & privacy → Settings → Accounts Center → Password and security → Two-factor authentication → Authentication app → Can’t scan the QR code? The text key shown there is what you paste into the generator.
Can I generate a Facebook 2FA code without the app?
Yes. Once you have the setup key, this page computes the same code an authenticator app would — in your browser, with no app install.
My Facebook 2FA code is rejected — what now?
Check that your device clock updates automatically, that you copied the full key, and that the code is fresh. See the troubleshooting guide for more fixes.
I lost my Facebook authenticator — how do I log in?
If you saved the setup key, generate codes here. Otherwise use Facebook’s account recovery: the backup codes you saved at setup, or the identity verification flow in the Help Center.