Password · guide

SMS codes for two-factor: better than nothing, weaker than it looks

By Alberto Gulotta · Updated · 16 min read

SMS codes are the one-time passcodes texted to confirm a sign-in, and CISA says any multi-factor authentication beats none at all. But NIST classifies the method restricted, and SIM swap, port-out fraud and real-time phishing can still steal the code — which is why Google, Apple and Microsoft now push authenticator apps, device prompts and passkeys instead.

Five numbers worth knowing before the rest of the page, each with its source
FactSource
An SMS code blocked 100% of automated bots, 96% of bulk phishing and 76% of targeted attacksGoogle Security Blog, 2019 study on Google Accounts
An on-device prompt blocked 100%, 99% and 90% against the same three attacksGoogle Security Blog, same 2019 study
NIST classifies the SMS/voice (PSTN) authenticator as the only one marked restrictedNIST SP 800-63B-4, final July 2025
In 2021 alone, the FBI’s IC3 logged 1,611 SIM-swap complaints and over $68 million in lossesFBI/IC3, PSA220208, February 2022
A company’s own marketing short code leases for $500–$1,000 a month, not a free verification codeCTIA Short Code Registry

What people mean by “SMS code”

“SMS code” names at least three different things. The most common sense, and this page’s subject, is a one-time passcode that a bank, an email provider or a social network texts to confirm a sign-in. NIST’s own glossary of secrets describes it as an out-of-band secret: “a short-lived secret generated by a verifier and independently sent to a subscriber’s device to verify its possession”.

A second sense belongs to marketing, not account security. The Short Code Registry, run by the wireless trade association CTIA, defines a short code as “a five- or six-digit number that can be used to send and receive text messages”, leased for $500 to $1,000 a month to send alerts, loyalty offers and coupons — not to verify a sign-in. Amazon Web Services, which sells short-code infrastructure, notes that OTP and two-factor codes can also travel over one, part of why the two meanings blur together.

Table comparing three meanings of an SMS code: verification code, marketing short code, virtual number
Table drawn from NIST, CTIA and two sellers’ own pages, showing the three different things people mean by “SMS code”. Figure drawn by AI Tools Primer from NIST SP 800-63B-4, CTIA Short Code Registry: Short Codes 101, SMSCodes.io and Get SMS Code (Google Play), read in full on 16 October 2026.

A third sense is a product in its own right: a phone number sold so a buyer can receive someone else’s verification code. SMSCodes.io, which sells access to real SIM numbers for exactly this, advertises them as a way to create and verify accounts, and Get SMS Code, an Android app selling temporary virtual numbers, markets the same idea as a way to register without handing over a personal phone number. Neither product is the one-time code itself — both are a stand-in for the phone number behind the code. The rest of this page is about the first meaning.

Is an SMS code better than no second factor at all?

Yes, measurably. CISA, the US cybersecurity agency, puts it plainly: “any MFA is better than no MFA”, even while ranking some methods well above others. A 2019 study by Google, with researchers from NYU and UC San Diego on real Google Accounts, put a number on that gap: an SMS code to a recovery phone number blocked 100% of bot attacks, 96% of bulk phishing and 76% of attacks aimed at a specific person.

Table of Google’s 2019 study comparing SMS code and on-device prompt against three attack types
Table drawn from Google’s 2019 account-hygiene study, showing the block rates of an SMS code against an on-device prompt for three attack types. Figure drawn by AI Tools Primer from Google Security Blog: New research: how effective is basic account hygiene at preventing hijacking (17 May 2019), read in full on 16 October 2026.

The same study measured a safer alternative side by side: an on-device prompt, which Google calls “a more secure replacement for SMS”, blocked 100%, 99% and 90% against the identical three attack types. Simply adding a recovery phone number, without ever sending a code to it, already blocked up to 100%, 99% and 66%; without one, Google’s fallback knowledge challenges saw phishing protection drop as low as 10%. Zero users who relied exclusively on a physical security key fell victim to targeted phishing during the whole investigation — the ceiling the SMS code does not reach.

Why NIST calls the SMS code a restricted authenticator

The US federal digital-identity standard gives the clearest answer. NIST finished a full rewrite, Special Publication 800-63, Revision 4, in July 2025, after nearly four years and almost 6,000 public comments. It states flatly: “there is one restricted authenticator: the use of the PSTN for out-of-band authentication” — PSTN meaning the ordinary phone network carrying an SMS or voice call. Nothing else used for a second factor carries that label.

Restricted is not a ban. NIST still lets an organisation use the method, but only under conditions: offer at least one alternative that is not restricted, give subscribers meaningful notice of the risks, and keep a migration plan ready. The reasoning is direct: “Out-of-band authentication is not phishing-resistant.” The split between two-factor and two-step is separate — a method can be a genuine second factor and still sit in NIST’s weakest tier.

One more requirement matters for a common habit: NIST says a device should not show the secret on a locked screen, and should ask for a PIN, passcode or biometric first. It also tells verifiers to weigh risk signals such as a device swap, SIM change or number port before trusting the phone network to deliver a code — the mechanism the next section explains.

What a SIM swap and a port-out actually do to the code

The two frauds behind most of this risk have official, distinct definitions from the FCC, the US telecoms regulator. “SIM swapping takes place when a bad actor convinces a victim’s wireless carrier to transfer the victim’s service from the victim’s cell phone to a cell phone in the bad actor’s possession”, the FCC states. Port-out fraud is a separate route: “the bad actor, posing as the victim, opens an account with a carrier other than the victim’s current carrier”. Either way, the FBI’s IC3 explains what follows: criminals use the SMS code sent to the stolen number to log in and reset passwords.

Table of FCC definitions and FBI complaint numbers for SIM swap and port-out fraud, with the FTX case
Table drawn from FCC, FBI/IC3 and Krebs on Security, showing the definitions of SIM swap and port-out fraud alongside complaint counts, losses by year, and the FTX case. Figure drawn by AI Tools Primer from FBI/IC3: PSA220208 (8 February 2022), FCC: news release on SIM swap and port-out rules (15 November 2023), and Krebs on Security: Arrests in $400M SIM-Swap Tied to Heist at FTX? (1 February 2024), read in full on 16 October 2026.

The FBI’s own figures show the problem growing: 320 SIM-swap complaints and about $12 million in adjusted losses from January 2018 to December 2020; in 2021 alone, 1,611 complaints and more than $68 million. One case shows what a single swap can be worth: journalist Brian Krebs reported that three Americans were charged with stealing more than $400 million in a November 2022 SIM-swap tied to the FTX exchange, after impersonating an AT&T customer at a retail store with a fake ID. An independent blockchain-analysis firm, Elliptic, put the stolen value at $477 million. The FCC’s 2023 rules now require carriers to use secure authentication before moving a number, and to notify the customer whenever a SIM change or port-out request is made. The FTC, the US consumer-protection agency, adds that “text message verification may not stop a SIM card swap” and recommends a PIN or password on the cellular account. A swap already underway needs different steps than the ones here.

How a code gets phished in real time

A SIM swap is not the only way an SMS code changes hands. CISA’s own account of a real intrusion describes an employee talked through the theft by a caller posing as IT support, who received the employee’s username, password and six-digit MFA code. CISA calls it a real risk, not a theoretical one: “these ‘MFA bypass’ attacks are not theoretical risks but are happening in the wild even against well-funded companies with excellent security staff”. It sums up the moment that defeats the code: “The employee then gets an authentication code on their phone, they type that in and bam! Problem solved. Disaster averted.” — except the code went to the attacker’s page.

The code never has to be intercepted: the victim hands it over, believing the request is legitimate. This is why CISA’s case for a resistant alternative is mechanical, not procedural: because only the key owner has physical access to the device, CISA says, “phishing scams don’t work”. Even Login.gov, a government service that still offers SMS, describes text and phone-call codes as convenient but “extremely vulnerable to theft, hackers, and other attacks”. The habit that defeats this attack is simple: never hand a verification code to someone who calls or messages asking for it.

What Google, Apple and Microsoft recommend instead

All three companies now steer people away from the SMS code in their own words. Microsoft, announcing it is phasing SMS out of personal accounts, states the reasoning outright: “SMS-based authentication is now a leading source of fraud” and “one of the most targeted vectors for account takeover”. In its place, Microsoft offers “a recovery email address, Microsoft Authenticator, or a passkey”, describing passkeys as “secure, phish-resistant replacements for your password”.

Table showing where the SMS code sits among second factors, from restricted to phishing-resistant
Table drawn from NIST, CISA and Apple, showing the SMS code’s restricted tier against authenticator-app codes and phishing-resistant security keys. Figure drawn by AI Tools Primer from NIST SP 800-63B-4, CISA: More than a Password and Phishing Resistant MFA is Key to Peace of Mind, and Apple: About Security Keys for Apple Account, read in full on 16 October 2026.

Google’s own help page recommends Google prompts instead of SMS verification codes, while listing another signed-in phone, a backup code, a security key or a passkey as recovery options. Apple keeps the six-digit code as its everyday method but offers a stronger step: “physical security keys provide extra protection for your Apple Account against phishing attacks”, because, once enabled, they become the only way to sign in, stopping the second factor being “remotely intercepted or requested by an attacker”. The trade-off: lose every device and key at once, and the account can be locked for good. Of the options available today, CISA singles out one: “The only widely available phishing-resistant authentication is FIDO/WebAuthn authentication.” An authenticator app rejecting codes, rather than the SMS code itself, is a different problem.

Where to start

Six questions, six jumps.

“What does ‘SMS code’ actually mean?”
Three meanings, one term — what sms code means
“Is any code better than none?”
Yes, with the numbers — better than nothing
“Why does NIST call it restricted?”
The one tier below the rest — why nist calls it restricted
“What exactly is a SIM swap?”
Two frauds, defined — sim swap and port out
“Can a code be phished directly?”
In real time, yes — phished in real time
“What should replace the SMS code?”
Three makers’ own words — what to use instead

Two-factor, piece by piece

The mechanics behind the code sit inside a wider set of pages on two-factor itself.

The accounts this code protects

The same SMS code shows up differently on each of these accounts, with its own limits and workarounds.

Questions people also ask

Where can I find a SMS code?

On a phone it lands as an ordinary text message; iPhone can detect the passcode in the message and show it above the keyboard for autofill. Login.gov, the US government’s own sign-in service, sends the same kind of one-time code by text or call, and warns the method is “extremely vulnerable to theft, hackers, and other attacks”.

What is a SMS text code?

NIST’s technical definition: a short-lived secret that a verifier sends out-of-band to a device solely to confirm the device is still in its owner’s possession, more familiarly a one-time passcode. It is the exact mechanism the US federal standard treats as restricted, its single weakest tier of authenticator.

How to identify SMS sender?

A genuine marketing text uses a five- or six-digit short code registered with the CTIA’s Short Code Registry, not an ordinary phone number; the same registry runs the number 7726 (“SPAM” on a keypad) for reporting one that looks wrong.

What are text message codes?

The phrase covers at least three different things: one-time passcodes for signing in, marketing short codes that companies lease for $500 to $1,000 a month, and long-code numbers used for two-way, conversational texting rather than one-off alerts.

Not covered here. It does not evaluate the virtual-number sellers named above, nor turn the short code into a B2B pricing guide. Nor does it walk through switching two-factor on or off, which belongs to turning two-factor off, or what to do when a code is requested during a sale, which verifying a code requested during a purchase covers. What holds instead is simple: every number above comes from the primary source named next to it — a government release, a company’s own study, or the independent reporting that confirmed it — never a paraphrase of one.

Sources

  1. NIST, U.S. government — SP 800-63B-4: Authenticator and Verifier Requirements: the single restricted classification for the PSTN/SMS authenticator, its conditions, and the lock-screen and risk-signal requirements — pages.nist.gov, read 16 October 2026.
  2. NIST, U.S. government — SP 800-63 Digital Identity Guidelines, Background: confirmation that Revision 4 is final as of July 2025, after nearly four years and almost 6,000 public comments — pages.nist.gov, read 16 October 2026.
  3. CISA, U.S. Department of Homeland Security — More than a Password: the “any MFA is better than no MFA” line and the case for FIDO/WebAuthn as the only widely available phishing-resistant method — www.cisa.gov, read 16 October 2026.
  4. CISA, U.S. Department of Homeland Security — Phishing Resistant MFA is Key to Peace of Mind: the real incident of a six-digit MFA code phished by a fake IT caller, and the case for security keys — www.cisa.gov, read 16 October 2026.
  5. FBI/IC3, U.S. government — Criminals Increasing SIM Swap Schemes to Steal Millions of Dollars from US Public (PSA220208): the SIM-swap mechanism and the 2018-2020 and 2021 complaint and loss figures — www.ic3.gov, read 16 October 2026.
  6. FCC, U.S. government — FCC Adopts Rules to Protect Consumers’ Cell Phone Accounts: the official definitions of SIM swapping and port-out fraud, and the 2023 carrier-authentication rules — docs.fcc.gov, read 16 October 2026.
  7. FTC Consumer Advice, U.S. government — SIM Swap Scams: How to Protect Yourself: the 2019 warning that text-message verification may not stop a SIM swap — consumer.ftc.gov, read 16 October 2026.
  8. Login.gov, GSA, U.S. government — Text/SMS or phone call: the federal sign-in service’s own description of the method as convenient but vulnerable, with its 10-minute code expiry — login.gov, read 16 October 2026.
  9. Short Code Registry / CTIA — Short Codes 101: the official definition and price of a marketing short code, distinct from a verification code, and the 7726 spam-reporting number — www.usshortcodes.com, read 16 October 2026.
  10. Google Security Blog, with NYU and UC San Diego researchers — New research: how effective is basic account hygiene at preventing hijacking: the 2019 block-rate figures for SMS codes, on-device prompts and security keys — security.googleblog.com, read 16 October 2026.
  11. Krebs on Security (Brian Krebs), independent security journalism — Arrests in $400M SIM-Swap Tied to Heist at FTX?: the named 2022 FTX-linked SIM-swap case and its independently confirmed value — krebsonsecurity.com, read 16 October 2026.
  12. Google Help, declared here as the maker’s own page — Fix common issues with 2-Step Verification: why Google recommends device prompts over SMS codes, and its recovery options — support.google.com, read 16 October 2026.
  13. Apple Support, declared here as the maker’s own page — About Security Keys for Apple Account: the maker’s own case for physical security keys over a code — support.apple.com, read 16 October 2026.
  14. Apple Support, declared here as the maker’s own page — Two-factor authentication for Apple Account: Apple’s own description of its standard six-digit code — support.apple.com, read 16 October 2026.
  15. Apple Support, declared here as the maker’s own page — Automatically fill in SMS passcodes on iPhone: where the code is found and autofilled on iPhone — support.apple.com, read 16 October 2026.
  16. Microsoft Support, declared here as the maker’s own page — Microsoft account security info & verification codes: the removal of the phone-number option and the Authenticator/passkey alternatives — support.microsoft.com, read 16 October 2026.
  17. Microsoft Support, declared here as the maker’s own page — Microsoft to stop sending SMS codes for personal accounts: Microsoft’s own stated reason for phasing SMS out — support.microsoft.com, read 16 October 2026.
  18. SMSCodes.io, declared here as a seller of this kind of service — SMSCodes.io: Verify your accounts with private numbers!: how a virtual-number seller describes the third meaning of the key — smscodes.io, read 16 October 2026.
  19. APPSTER LTD, declared here as a seller of this kind of service — Get SMS Code: Receive Online (Google Play listing): how a seller app markets the same virtual-number idea — play.google.com, read 16 October 2026.
  20. Amazon Web Services, declared here as a seller of short-code infrastructure — A Guide to SMS Short Codes with AWS End User Messaging: the technical distinction between a short code and a long code — aws.amazon.com, read 16 October 2026.

Written by Alberto Gulotta

Founder and editor of AI Tools Primer, writing from Palermo, Italy. Thirty-five years of taking computers apart, starting with a Commodore 64 — the long version is on the about page.

Something wrong on this page? Write to aitoolsprimer@gmail.com and it gets fixed.

Written on 16 October 2026.

Independence and limits

No affiliate links and no paid placements anywhere on this site. Nobody pays to appear here, and no company has seen this page before you did.

This is general information, not professional advice. Where a page touches money, health, safety or the law, it names its source and the date it was read — and your situation may still differ. See the privacy page and the cookie policy.