Discord 2FA Code Generator
Generate your Discord 2FA code from the secret key Discord shows when you enable two-factor authentication. Paste the key below — computed in your browser, refreshed every 30 seconds.
Codes are computed in your browser with the Web Crypto API — the key never leaves this page. Only use keys for Discord accounts you own or are authorized to manage.
Where to find your Discord 2FA secret key
- In Discord, open User Settings (the gear next to your username) → My Account.
- Under Password and Authentication, choose Enable Two-Factor Auth and enter your password.
- Choose “use an authenticator app”. Discord shows a QR code and, beneath it, the 2FA key as text.
- Copy that text key (or scan with an app first and note the key from the app) and paste it into the generator above.
- Enter the displayed six-digit code in Discord to finish, then download your backup codes.
Already enabled 2FA? Discord does not show the old key again. Disable and re-enable the authenticator method to reveal a fresh key — remember that any other app holding the old key stops working.
When Discord asks for 2FA codes
Beyond new-device logins, Discord prompts for the code on sensitive actions: enabling 2FA requirements on servers you own, granting moderation or administrator permissions, and changing authentication settings. Server owners can enforce “2FA for moderation” in server security settings, which makes a reliable code source essential — keep this page pinned or use the single-key generator saved in your browser.
Discord 2FA troubleshooting
- “Invalid code” — sync your device clock to automatic and enter a fresh code; see 2FA code not working.
- Phone replaced or app deleted — a backup code from setup restores access; then re-add the authenticator and save a new key.
- No backup codes — Discord support can help with the account phone number or email verified before the lockout.
Frequently asked questions
Where does Discord show the 2FA setup key?
In User Settings → My Account → Enable Two-Factor Auth. Choose “use an authenticator app”, and on the QR screen Discord also displays the 2FA key as text under the code — that key is what you paste into the generator.
Why does Discord ask for a 2FA code so often?
Discord requires the code for sensitive actions: enabling 2FA on servers you own, moderation and administrator actions, and some logins on new devices. Keep the generator in a pinned tab to answer prompts quickly.
I lost my Discord authenticator — what can I do?
Use one of the backup codes Discord showed when you enabled 2FA (Settings → My Account → View Backup Codes). Without backup codes or the setup key, contact Discord support.