Use a SIM PIN for your iPhone or iPad
Lock your SIM card with a PIN (personal identification number) so an identification code is required to make phone calls and use mobile data.
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.
Turn your SIM PIN on or off
If you have an iPhone with a single SIM card or eSIM, go to Settings > Mobile > SIM PIN. If you have an iPhone with Dual SIM or Dual eSIM, go to Settings > Mobile > tap the number you want to modify > SIM PIN. If you have an iPad, go to Settings > Mobile > 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 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.
If you have forgotten or don't know your SIM PIN
Never try to guess a SIM PIN or 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, here's what to do:
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 aren't sure which network provider to call and your device has an eSIM, go to Settings > Mobile and your network provider will be 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 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.