Lock your SIM card or eSIM with a PIN (personal identification number) so that an identification code is required for phone calls and mobile data usage.
To protect your SIM card or eSIM from others using it for phone calls or mobile data, you can use a SIM PIN. Then every time you restart your device or remove the SIM card, your SIM card or eSIM will be locked automatically and you’ll see “Locked SIM” in the status bar.
Don't try to guess your SIM PIN. The wrong guess can lock your SIM card or eSIM permanently, which means you would need a new SIM card or eSIM.
Open the Settings app.
Tap Cellular.
If you have an iPhone with a single SIM card or eSIM, tap SIM PIN and turn on or turn off your SIM PIN.
If you have an iPhone with Dual SIM or Dual eSIM, tap the number you want to modify and tap SIM PIN. Turn on your SIM PIN or turn it off.
If you have an iPad, tap SIM PIN and turn on your SIM PIN or turn it off.
If asked, enter your SIM PIN. If you've never used one, enter the default SIM PIN from your network provider. If you don’t know what the default SIM PIN is, don't try to guess it. Check your network provider's customer service page or the documents that came with your wireless plan. Or you can contact your network provider.
Tap Done.
Never try to guess a SIM PIN or Personal Unlocking Key (PUK) code.* The wrong guess can lock your SIM card or eSIM permanently, and then you would need a new SIM card or eSIM.
If your device asks for a PIN or code that you don’t know, follow these steps:
Contact the network provider that gave you the SIM card or eSIM. If you aren't sure which network provider to call and have a device with a physical SIM card, remove your iPhone SIM card or iPad SIM card and check the card for the network provider's name or logo.
If you’re not sure which network provider to call and your device has an eSIM, open the Settings app and tap Mobile Service. Your network provider is listed directly above “Turn On This Line”.
Ask your network provider to help you unlock your SIM card or eSIM using the default SIM PIN or PUK code.
If you can’t unlock your SIM card or eSIM using the SIM PIN or PUK code, or if an alert says “PUK exhausted”, ask for a new SIM card or eSIM.
*If you enter the wrong SIM PIN too many times, your wireless network provider may be able to give you a PUK code.