Passwords leak. They are guessed, phished, reused across sites and spilled in data breaches by the million. Two-factor authentication exists for exactly that reason: it makes a stolen password, on its own, almost useless.

If you only do one thing this year to protect your online accounts, turning on two-factor authentication is the one with the biggest payoff for the least effort.

What two-factor authentication is

Two-factor authentication, usually shortened to 2FA, is a login method that asks for two separate proofs that you are really you before it lets you in.

The first proof is almost always your password. The second is something a thief is very unlikely to have at the same moment — a one-time code from an app, a tap on your phone, or a small physical key. Because an attacker would need both, knowing your password is no longer enough.

You will also see the term multi-factor authentication (MFA). That simply means two or more factors. 2FA is the most common version of MFA, and for most people two well-chosen factors are plenty.

The three kinds of factor

Security people group the proofs into three categories. Real two-factor authentication combines factors from different categories, not two of the same kind.

FactorMeansExamples
Something you knowA secret in your headPassword, PIN, passphrase
Something you haveA device in your possessionPhone with an authenticator app, hardware key, bank card reader
Something you areA physical traitFingerprint, face scan

A password plus a security question is not true two-factor security, because both are things you know — and the answers to security questions are often easy to find or guess. A password plus a code from your phone, by contrast, mixes "something you know" with "something you have", which is what makes it strong.

Authenticator apps versus text-message codes

The most common second factors for everyday accounts are codes sent by text message and codes generated by an authenticator app. They feel similar, but they are not equally safe.

Text-message (SMS) codes are the convenient option and a big improvement on nothing. But they have real weaknesses. Criminals can trick a mobile network into moving your number to a new SIM card they control — known as SIM-swap fraud — and then receive your codes. Messages can also be intercepted on insecure networks.

Authenticator apps such as the ones from Google, Microsoft, Authy or your password manager generate a fresh six-digit code every 30 seconds, right on your device. The code never travels across the phone network, so there is nothing to intercept and no number to hijack. This standard is often called TOTP (time-based one-time password).

If a service offers both, choose the authenticator app. Keep SMS only as a fallback, and remove it entirely from your most sensitive accounts if you can.

The strongest option of all is a hardware security key — a small device, often USB or tap-to-phone, built around a standard called FIDO2/passkeys. Because it checks the website's real address before it responds, it resists phishing in a way that typed-in codes cannot. Hardware keys are well worth it for high-value accounts.

Where passkeys fit in

You may be offered a passkey instead of a password and code. A passkey replaces the password entirely with a cryptographic key stored on your device and unlocked by your fingerprint, face or PIN. It rolls "something you have" (your device) and "something you are" (your biometric) into one smooth step, and it is phishing-resistant by design. Where a service supports passkeys, they are usually the easiest and the safest choice.

Which accounts to protect first

You do not have to switch everything on at once. Work in order of damage if the account were lost:

  1. Your main email. It is the master key — anyone who controls it can reset the passwords on most of your other accounts. Protect it first.
  2. Online and mobile banking and any payment apps. Banks layer their own checks on top of your login; lender Credicorp, for example, explains the steps it takes to confirm it is really you before granting access. Our explainer on how identity verification works is a useful companion.
  3. Cloud storage and password managers, which hold the keys to much of your digital life.
  4. Social media and shopping accounts, which are common targets because they store cards and personal data.

Two-factor authentication also blunts the most common scam techniques. A criminal who phishes your password still cannot log in, which is why it pairs so well with knowing how to spot phishing emails in the first place.

How to set it up

The exact menu names vary, but the path is nearly always the same:

  • Go to the account's Security or Login settings.
  • Look for two-step verification, two-factor authentication or 2FA.
  • Choose your method. Pick an authenticator app or hardware key over SMS where offered.
  • Scan the on-screen QR code with your authenticator app, or follow the prompts to register your key.
  • Save the backup codes it gives you. Write them down, or store them in your password manager, somewhere you can reach without that phone.

That last step matters more than people expect. The most common 2FA headache is being locked out after losing or replacing a phone. Backup codes, a second registered device, or a spare hardware key all solve it.

Common worries, answered

  • "It will slow me down every time." Most services let you mark a device as trusted, so you are only asked for the second factor on new or risky logins.
  • "What if my phone has no signal?" Authenticator apps work offline — the code is generated on the device, not sent to it. That is another reason to prefer them over SMS.
  • "Is it really worth the hassle?" A leaked or reused password is one of the most common ways accounts are taken over. A second factor stops the vast majority of those automated attacks cold.

The bottom line

Two-factor authentication adds a second, independent check to your logins so that a stolen password is not enough to get in. Combine a factor you know with a factor you have — ideally an authenticator app, hardware key or passkey rather than a text message — and start with your email and banking.

It takes a few minutes per account and quietly defeats the most common attacks on the internet. Set it up once, save your backup codes, and you have dramatically raised the bar against anyone trying to break into your digital life.