Two-factor authentication is the most reliable way to protect Facebook from being hacked. Even if your password leaks or you enter it on a fake page, an outsider will not get in without the second factor. Here is how to turn on two-factor authentication on Facebook in 2026, which method to choose, where to get backup codes and what to do if the phone with your codes is lost.

How two-factor authentication works

When you log in from a new device or browser, Facebook asks not only for the password but also for confirmation with a second method. It can be:

The best choice for most people is an authentication app plus saved backup codes.

How to turn on two-factor authentication on a phone

  1. Open the Facebook app and tap the menu.
  2. Go to Settings and privacy - Settings - Accounts Center.
  3. Choose Password and security - Two-factor authentication.
  4. Select the Facebook account.
  5. Choose a method: Authentication app or SMS, and tap Next.
  6. For the app: scan the QR code in the authenticator app or copy the setup key, then enter the code it shows. For SMS: confirm the number and enter the code from the message.
  7. Enter your Facebook password to finish the setup.

If you are setting up the authenticator on the same phone that has Facebook, it is easier to copy the key than to scan a QR code from the phone itself.

How to turn it on on a computer

  1. Log in at facebook.com, click your profile picture and open Settings and privacy - Settings.
  2. Open Accounts Center - Password and security - Two-factor authentication.
  3. Select the account and the protection method.
  4. Scan the QR code on the screen with the authenticator app on your phone and enter the code it gives you.
  5. Confirm with your password.

A security key is added in the same place as a separate method once the main method is already on.

Backup codes: be sure to save them

Backup codes are a set of one-time codes that replace the second factor if your phone is lost, broken or the authenticator was deleted. You can get them in the two-factor authentication section: the Recovery codes item.

What to do if you cannot access the second factor

  1. Use a backup code - on the code entry screen choose another way to log in.
  2. Approve the login from a device where you are already signed in. If Facebook is open on an old computer or tablet, allow the login from there.
  3. Try SMS if a number is linked and you have the SIM card.
  4. Go through recovery. If you have none of these, choose the option on the login screen saying you do not have access. Facebook will offer to confirm your identity, usually with a review period. More in how to recover a Facebook account.

When changing phones, move the authenticator in advance: many apps can export codes or sync them through a cloud account.

What else to turn on for protection

Two-factor authentication matters especially if you manage a business page or an ad account: Meta increasingly requires it from admins. Promoting a page, including through an SMM panel, never requires handing over your password or codes, so if someone asks you for a code from an SMS or authenticator, they are almost certainly a scammer. General security rules for all social networks are collected in how to protect your account from hacking.