To lock your SIM card, set a SIM PIN. On iPhone: Settings, Cellular, SIM PIN, turn it on. On Android: Settings, Security and Privacy, SIM card lock, turn it on. Enter your carrier's default PIN, then change it to a code only you know. The PIN is required whenever the phone restarts or the SIM moves to another device. Also add a port freeze: a SIM PIN cannot stop a remote SIM swap.
Key takeaways
- A SIM PIN locks the SIM itself, so a stolen SIM is useless in another phone — but it does not stop a remote SIM swap done through your carrier.
- Never guess the default PIN: three wrong tries lock the SIM and you will need the PUK code from your carrier.
- Add a carrier port freeze or transfer PIN as well — that is the control that stops someone moving your number to their phone.
Your phone number is the key to your bank, your email and your social accounts — because so many of them send reset codes by text. Locking your SIM card with a PIN takes about five minutes, and it is the cheapest protection you can add to your phone.
What does locking your SIM card actually do?
Locking your SIM card sets a SIM PIN — a 4-to-8-digit code stored on the SIM itself. Once it is on, the SIM will not connect to the mobile network until the correct PIN is entered, which happens every time the phone restarts or the SIM is moved to another phone.
That matters in two situations. If your phone is stolen, the thief cannot move your SIM into their phone to receive your calls and texts — including the two-factor codes your bank sends.
It also blocks someone who tries to use a swapped SIM, since the PIN stops them there too. Apple describes the feature plainly: a SIM PIN protects your SIM card or eSIM from others using it for phone calls or cellular data.
What a SIM PIN does not do is just as important. It does not stop a remote SIM swap, where an attacker convinces your carrier to move your number to a SIM they control. That attack never touches your physical SIM, so the PIN never gets asked. You need a second control for that — a carrier port freeze — which this guide covers below.
A SIM PIN is also not the same as your screen lock. The screen lock protects the phone and its data; the SIM PIN protects the mobile service tied to the SIM. You should have both on.
How do you lock your SIM card on iPhone?
On iPhone, the setting takes about two minutes. Apple documents the steps for both physical SIMs and eSIMs, and the setting is per line on dual-SIM phones.
- Open the Settings app.
- Tap Cellular (on some versions, Mobile Data or Mobile Service).
- Tap SIM PIN. On a dual-SIM or dual-eSIM iPhone, tap the number you want to change first, then tap SIM PIN.
- Turn on the SIM PIN switch.
- When asked, enter your carrier's default SIM PIN. If you have never used one, this is the code your carrier set — do not guess it. Apple warns that a wrong guess can permanently lock your SIM or eSIM.
- Tap Done, then tap Change PIN and set a code only you know, 4 to 8 digits. Avoid 1111, 1234 and your birth year.
From now on, your iPhone will ask for the SIM PIN every time it restarts, or when the SIM is removed and reinserted. If you do not know the default PIN, check your carrier's customer service page or the documents that came with your plan — or contact the carrier.
Verizon's own instructions confirm the default SIM PIN on its network is 1111, and its guide notes the setting is not available on an eSIM-activated line.
How do you lock your SIM card on Android?
On Android the menu path varies by manufacturer, but the steps are the same: find the SIM lock setting, turn it on, enter the carrier default, then change it to your own code.
Google Pixel and stock Android
- Open Settings.
- Tap Security & Privacy.
- Tap More security settings.
- Tap SIM card lock and choose the SIM if you have two.
- Turn on Lock SIM card and enter the carrier's default PIN.
- Tap Change SIM PIN, enter the old PIN, then enter your new PIN twice.
Samsung (One UI)
- Open Settings.
- Tap Biometrics and Security.
- Tap Other security settings.
- Tap Set up SIM card lock and switch it on.
- Enter the carrier's default PIN, then change it to your own code.
If you cannot find the setting, use the search box at the top of Settings and type "SIM lock" — it will take you straight there on most phones. The same three-wrong-tries rule applies: after three incorrect attempts the SIM locks and asks for the PUK code from your carrier.
What is the difference between a SIM PIN, a PUK and a carrier lock?
These three get confused constantly, and confusing them is how people lock themselves out. Here is the short version.
| Feature | What it does | Where it lives | What if you forget it |
|---|---|---|---|
| SIM PIN | Locks the SIM until the code is entered | On the SIM or eSIM chip | 3 wrong tries → SIM asks for PUK |
| PUK code | Unlocks a SIM locked by wrong PINs | With your carrier (8 digits) | Too many wrong PUK tries → SIM permanently disabled |
| Carrier lock | Ties the phone to one carrier's network | On the phone, set by the carrier | Ask the carrier to unlock after the contract terms are met |
| Port freeze | Blocks moving your number to another carrier or SIM | On your carrier account | Turn it off in the carrier app when you genuinely want to port |
The PUK deserves respect. It is an 8-digit code that only your carrier can give you — usually from your account page, the carrier app, or support. Entering it wrong too many times can permanently destroy the SIM, leaving you to get a replacement. Write the PUK down somewhere safe, separate from your phone, when you first set up the SIM PIN.
How do you stop SIM swapping, not just SIM theft?
A SIM swap is a different attack from SIM theft. In a swap, the attacker never touches your phone. They convince your carrier — usually by social engineering a support agent — to move your number to a SIM they control.
Then your texts, including bank codes, go to them. The FCC adopted rules in November 2023 requiring wireless providers to authenticate customers securely before redirecting a number to a new device or provider, and to notify customers immediately whenever a SIM change or port-out is requested.
Rules help, but the control you own is the carrier port freeze. Set it up with your carrier now, before anything happens:
- Verizon: set a Number Transfer PIN in your account. Verizon also offers a Number Lock that blocks port-outs entirely until you turn it off.
- T-Mobile: turn on SIM Protection in the T-Life app under Profile, then Privacy and Security. You can also set an account PIN and a transfer PIN.
- AT&T: turn on Wireless Account Lock in the myAT&T app, which blocks number porting from your account.
Beyond the freeze, harden the account itself: set a strong account PIN with the carrier, add a verbal password if offered, and turn off any "port my number" self-service option you do not need. Then reduce your dependence on SMS. Our guide to checking whether your phone is hacked explains the signs that your number or accounts may already be compromised.
Finally, move your most important accounts off SMS two-factor authentication. Use an authenticator app or a passkey for email, banking and password manager accounts. SMS should be the last resort, not the default — because a swapped number hands the attacker every code sent to it.
What happens if you forget your SIM PIN?
Do not keep guessing. After three wrong attempts, the SIM locks and asks for the PUK code. At that point the PIN no longer matters — only the PUK can unlock the SIM.
- Stop entering codes. Each wrong PUK attempt brings the SIM closer to permanent lockout.
- Get the PUK from your carrier. Log in to your carrier's account page or app from another device on Wi-Fi, or call support. The PUK is usually shown in your account details or on the card the SIM came in.
- Enter the PUK once, carefully. The phone will then ask you to set a new SIM PIN.
- Write the new PIN and the PUK down somewhere safe — a password manager is ideal — so this does not happen again.
If the SIM is permanently locked, you will need a replacement SIM or eSIM from your carrier. Your number stays yours; only the card changes. Getting a replacement usually takes a store visit or a mailed SIM, so keep the PUK safe and avoid the hassle entirely.
What should you do if your number has already been swapped?
Act within minutes. A swapped number means the attacker is already receiving your calls and texts, and they will move fast to reset your email and bank passwords.
- Call your carrier from another phone. Tell them your number was swapped without your permission. Ask them to restore the number to your SIM and freeze the account against further changes.
- Secure your email first. Email is the key to everything else. Reset its password from a trusted device, check for new forwarding rules and unknown devices, and turn on app-based two-factor authentication.
- Call your bank. Flag the account, check for transfers you did not make, and ask about reversing any that went out.
- Check your other accounts. Look for password reset emails, new login alerts and changed recovery options on your password manager, social accounts and crypto accounts.
- Report it. File a report with the FTC and the FBI's Internet Crime Complaint Center. The carrier's fraud team will also want a case number.
After the dust settles, set up the SIM PIN and the port freeze so it cannot happen again — and move your important accounts off SMS authentication for good. If your phone itself shows signs of compromise, our guide to securing your Wi-Fi covers the network side of locking down a mobile device.
The bottom line
Locking your SIM card is a five-minute job with an outsized payoff: a stolen SIM becomes useless, and a swapped number is much harder to exploit when the carrier account is frozen too. Set the SIM PIN today, write down the PUK, and turn on your carrier's port freeze.
Then go one step further and move your email and banking off SMS codes. You can check whether any of your passwords have already leaked with the free pwned password checker — and replace the ones that have before someone else uses them.
Frequently asked questions
How do I lock my SIM card on iPhone?
Open Settings, tap Cellular, then tap SIM PIN and turn it on. Enter your carrier's default PIN when asked, then tap Change PIN and set a code only you know. Apple warns never to guess the PIN, because wrong guesses can permanently lock the SIM.
How do I lock my SIM card on Android?
On a Pixel, open Settings, then Security and Privacy, then More security settings, then SIM card lock, and turn it on. On Samsung, open Settings, then Biometrics and Security, then Other security settings, then Set up SIM card lock. Enter the carrier default PIN, then change it.
What is the default SIM PIN for my carrier?
Verizon's default SIM PIN is 1111 and AT&T's is also 1111, while T-Mobile's is 1234. Do not guess: if you are unsure, check your carrier's support page or the documents that came with your plan before entering anything.
What happens if I enter the wrong SIM PIN three times?
After three wrong attempts the SIM locks and asks for a PUK, or Personal Unblocking Key, an eight-digit code from your carrier. You can get it from your carrier's account page or support line. Do not guess the PUK either: too many wrong PUK attempts can permanently disable the SIM.
Does a SIM PIN stop SIM swapping?
Not on its own. A SIM PIN stops someone using your physical SIM in another phone, but a SIM swap happens at the carrier, where an attacker convinces support to move your number to their SIM. For that you need a carrier port freeze or transfer PIN, plus account security.
What is the difference between a SIM PIN and a carrier lock?
A SIM PIN locks the SIM card so it cannot be used without the code. A carrier lock, also called a SIM lock, ties the phone itself to one carrier so it cannot be used on another network. They are different features controlled in different places.
Does a SIM PIN work with eSIM?
Yes. Apple's SIM PIN guidance covers both physical SIMs and eSIMs, and the setting works the same way. The PIN is stored on the SIM or eSIM chip, and it is required when the phone restarts or the line is moved.
Should I still use SMS for two-factor authentication?
Avoid it where you can. Use an authenticator app or a passkey instead, because SMS codes can be intercepted in a SIM swap. If a service only offers SMS, a SIM PIN plus a carrier port freeze is your best protection for that number.
Sources
The engineers and analysts who build Cysoro's domain scanner, email-authentication checks and free security tools. We test what we write about every day — SPF, DKIM, DMARC, certificates, look-alike domains and phishing — and check each guide against the relevant standards, government guidance and vendor documentation.
Checked against Apple Support's SIM PIN guidance, the FCC's SIM swap and port-out fraud rules, and Verizon's SIM PIN instructions.
How we write and fact-check →