Use a SIM PIN for your iPhone or iPad
Lock your SIM card with a PIN (personal identification number) so that an identification code is required for phone calls and cellular 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 automatically locked and you’ll see “Locked SIM” in the status bar.
Don't try to guess your SIM PIN. The wrong guess can permanently lock your SIM card or eSIM, which means you would need a new SIM card or eSIM.
Turn your SIM PIN on or off
If you have an iPhone with a single SIM card or eSIM, go to Settings > Mobile Data > SIM PIN. If you have an iPhone with Dual SIM or Dual eSIM, go to Settings > Mobile Data > tap the number you want to modify > SIM PIN. If you have an iPad, go to Settings > Mobile Data > SIM PIN.
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 carrier. If you don’t know what the default SIM PIN is, don't try to guess it. Check your carrier's customer service page or the documents that came with your wireless plan. Or you can contact your carrier.
Tap Done.
If you have forgotten or don't know what your SIM PIN is
Never try to guess a SIM PIN or PUK code.* The wrong guess can permanently lock your SIM card or eSIM, 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, here's what to do:
Contact the service 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 aren't sure which network provider to call and your device has an eSIM, go to Settings > Mobile Data and your network provider will be listed directly above "Turn On This Line".
Ask your service 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 carrier may be able to give you a Personal Unlocking Key (PUK).
Information about products not manufactured by Apple, or independent websites not controlled or tested by Apple, is provided without recommendation or endorsement. Apple assumes no responsibility with regard to the selection, performance or use of third-party websites or products. Apple makes no representations regarding third-party website accuracy or reliability. Contact the vendor for additional information.