Skip to content
OTP Generator

Discord 2FA code generator

Paste your Discord two-factor secret key to get the current 6-digit login code, the same one your authenticator app shows.

Find it under “Can’t scan the QR code?” when you turn on 2FA. Only have the QR?

2Your code will appear here
Paste a key to start
Calculated in your browser. Your key is never sent anywhere.
On this page

Discord protects accounts with an authenticator app first, and only then lets you add SMS as a backup. During setup Discord shows a QR code along with a 2FA key for manual entry. Paste that key into the generator above to read the 6-digit code Discord asks for when you log in or perform sensitive actions.

If you run or moderate a server, 2FA is often mandatory: owners can require it for anyone with moderation permissions. Generating codes here keeps the process quick on a PC while the key stays on your machine. Still, keep the key in a proper authenticator or password manager, and download your Discord backup codes as a safety net.

How to find your Discord secret key

  1. Open Discord and go to User Settings (gear icon) → My Account.
  2. Under Password and Authentication, select Enable Authenticator App.
  3. Enter your Discord password when prompted.
  4. Discord displays a QR code with a 2FA key for manual entry next to it. Copy that key.
  5. Store the key privately before entering the confirmation code.

How to log in to Discord with the code

  1. Paste your Discord key into the generator at the top of this page.
  2. Copy the 6-digit code and paste it into Discord's Log in with your code box.
  3. Activate 2FA, then use this page whenever Discord requests an authentication code, for example on login or when changing account details.

Discord 2FA tips

  • After enabling 2FA, Discord offers backup codes under My Account. Download them; each can be used once to sign in without your key.
  • Server owners: Server Settings lets you require 2FA for moderators, which blocks moderation actions from staff who have not enabled it.
  • Be wary of anyone in DMs asking for your codes or key, even if they claim to be Discord staff. Real staff never need them, and scams of this kind are common.

Your Discord key is processed only in this browser and is never uploaded. Keep a copy in an authenticator app or password manager as well.

Discord 2FA FAQ

Why does Discord ask for a code when I ban someone or delete a channel?

If the server requires 2FA for moderation, Discord checks that your account has 2FA enabled before allowing sensitive actions. Make sure your account has the authenticator app enabled; then those actions will work.

Can I add SMS instead of an authenticator?

Discord requires the authenticator app method first. After that, you can add a phone number as a backup option. The authenticator key remains the primary way to generate codes. Keep in mind that SMS is weaker against SIM-swap attacks.

I lost my phone. How do I log in to Discord?

Use the key you saved by pasting it here, or enter one of your backup codes on the login screen. If SMS backup was enabled, that also works. Without any of these, Discord support may not be able to restore 2FA access.

Will my Discord key be shared with anyone?

No. This page calculates the code in your browser and does not send the key to any server. Never paste your key into websites or bots that someone sends you in a Discord message.

Get your Discord code

Paste the Discord setup key and copy the current 6-digit code in seconds.