Your phone number lives on a SIM
A SIM swap attack is a scam where someone tricks your phone company into moving your phone number onto a SIM card they control. To see why that is such a big deal, you first need to know what a SIM actually does.
Your phone number is not stored inside your phone like a photo. It belongs to your account at a carrier, the phone company that runs the cell network (like the company on your family's phone bill). The carrier keeps a record that says, in effect, "texts and calls for this number go to this SIM."
SIM card
A SIM (Subscriber Identity Module) is a tiny chip that proves to the carrier, "this phone is allowed to use this account." Swap the SIM into another phone and the number goes with it.
eSIM
An eSIM (embedded SIM) does the same job with no plastic card. The carrier sends a digital SIM profile that gets installed on a chip already built into the phone.
The carrier's record
This is the part that matters most. Whoever can change the record "number goes to SIM A" can decide which phone rings when someone calls or texts you.
Moving a number to a new SIM is a normal, useful thing. People do it every day when they break a phone, lose one, or upgrade. Carriers make it easy on purpose. A SIM swap attack abuses that same helpful process.
Simple definition: in a SIM swap, the attacker never touches your phone. They change the carrier's record so your number points to their SIM instead of yours.
How a SIM swap works
Most SIM swaps are not high-tech hacking. They are social engineering: tricking a person into doing something by pretending to be someone else. Here the person being tricked is a carrier employee whose job is to help customers.
The attacker gathers facts about you, then contacts the carrier pretending to be you: "I lost my phone, please move my number to this new SIM." If the carrier's checks are weak, or the attacker has enough of your personal details to pass them, the record gets changed. In rarer cases, criminals have bribed store employees to do it. A close cousin is a port-out scam, where the attacker moves your number to a different carrier instead.
Step through the toy model below. Use Send a login code at any point to see which phone the text reaches. Then turn on Number lock and run it again.
Key idea: the website did nothing wrong. It sent the code to your number, exactly as asked. The number just doesn't lead to you anymore.
Why text codes are the weak link
Two-factor authentication (2FA) means proving who you are with two different things, usually something you know (a password) and something you have (your phone). A very common version texts you a six-digit code. That code is called an SMS code, since SMS is the technical name for text messages.
The idea is that a thief who steals your password still can't get in without your phone. But an SMS code doesn't really prove you have your phone. It proves you have your phone number. After a SIM swap, the attacker has your number.
It gets worse with account recovery, the "Forgot password?" button. Many sites will let anyone who can receive a text at your number reset your password. So a single swapped number can knock over accounts like dominoes:
Number moved to the attacker's SIM.
"Forgot password" on your email. The reset code is texted to them.
With your email, they reset other accounts that send links there.
Social media, games, shopping, and money apps are now at risk.
What has happened in the real world
SIM swapping is not just a classroom idea. News reports have described people losing large amounts of cryptocurrency after attackers swapped their numbers and reset their exchange accounts. Well-known people, including tech leaders and celebrities, have had social media accounts taken over and used to post scams. Law enforcement agencies have charged groups of SIM swappers, and in the United States the Federal Communications Commission (FCC) adopted rules in 2023 that require carriers to use stronger checks before moving a number and to alert customers when it happens.
Attackers usually target people they think have something valuable, like money, a rare username, or a popular account. But anyone who uses text codes is exposed in the same way, and the fixes are free.
Still use it if it's all you have: SMS 2FA is far better than a password alone. Most attackers never try a SIM swap. The goal is to upgrade where you can, not to turn 2FA off.
Warning signs, and what to do
The biggest clue is simple: your phone suddenly says No Service or SOS only in a place where it always works. Your Wi-Fi may still work, so apps can look normal at first. Sort each situation below. Is it a red flag, or probably nothing?
If you think your number was swapped
- Act fast. Every minute counts, because the attacker is racing to reset passwords.
- Tell a trusted adult, especially whoever manages the phone plan. The account holder is usually the one the carrier will talk to.
- Call the carrier from another phone, or use their official app or website over Wi-Fi. Use the number from the carrier's real website or your bill, never one from a text you received.
- Secure your email first. From a safe device, change your email password and check its recovery phone and email. Email is the key that opens everything else.
- Check other important accounts, like banking, social media, and gaming. Sign out other sessions and switch them to an authenticator app or passkey.
Lock down your number
You can fight a SIM swap at two points: make the swap itself harder, and make your accounts stop trusting your phone number so much.
1. Make the swap harder
- Account PIN or passcode: a secret the carrier asks for before making changes. Pick one that is not your birthday or the last four digits of anything.
- Number lock / port-out protection: many carriers offer a free setting, with names like "number lock," "SIM protection," or "account lock," that blocks SIM changes and transfers until you turn it off yourself.
- Share less: attackers pass carrier checks with details like your birthday, address, and phone number. Keep those off public profiles.
- Never share your carrier PIN or a code by text or phone call. Real carrier support won't contact you and ask for it.
2. Pick a stronger second step
An authenticator app makes codes right on your phone, so nothing travels over the phone network. A passkey is a secret key stored on your device that signs you in without any code at all. Compare them below. The bars show how well each one holds up.
3. Check your own setup
Tick off what you (or your family) have done. The bars show a rough, made-up "attacker signal": how much room you leave for a SIM swapper. It is a toy score to help you prioritize, not a real measurement.
Quick answers
What is a SIM swap attack?
A SIM swap attack is when a scammer tricks your phone company into moving your phone number onto a SIM card or eSIM that the scammer controls. After that, your calls and texts go to their phone instead of yours. They usually do it to catch the login codes that websites text to you.
How do I know if my SIM was swapped?
The biggest sign is that your phone suddenly shows No Service or SOS only in a place where it normally works. Other signs are a message from your carrier about a SIM change you did not make, password reset emails you did not ask for, or being logged out of accounts. If this happens, contact your carrier right away from another phone or over Wi-Fi.
Can hackers see my photos and apps after a SIM swap?
No. A SIM swap moves your phone number, not your phone. The attacker does not get your photos, apps, or files. They get your calls and texts, and they use those texts to reset passwords on accounts that trust your number.
Can a SIM swap happen with an eSIM?
Yes. An eSIM is a digital SIM, but your number is still tied to your account at the carrier. If a scammer convinces the carrier to move the number to a new eSIM on their phone, the result is the same. The defenses are also the same: a strong account PIN and number lock.
Is text message two-factor authentication still worth using?
Yes, it is much better than a password alone, because most attackers will not bother with a SIM swap. But if an account offers an authenticator app, a passkey, or a security key, switch to that instead, especially for your email account.
How do I protect my phone number from SIM swapping?
Ask whoever manages your phone plan to set a strong account PIN and turn on the carrier's free number lock or SIM protection feature. Then move important accounts off text codes to an authenticator app or passkey, remove your phone number as a recovery option where you can, and save backup codes somewhere safe.
Quick quiz
1. In a SIM swap attack, what does the attacker actually take over?
2. Your phone suddenly shows "No Service" at home, where it always works. What is the best first move?
3. Which second step does a SIM swap NOT help an attacker get past?
4. What does a carrier's number lock (or SIM protection) setting do?
Keep learning
Learn how security really works
Protecting a phone number is one small piece of cybersecurity. CodeHS courses teach the full picture, from how networks move data to how defenders think about attacks.
Part of the Cybersecurity Skills and Careers tutorial series.