What is a PUK code and how do you get one?

Last reviewed:

If you enter the wrong SIM PIN three times, your SIM locks and asks for a PUK code. The PUK is an 8-digit code unique to your SIM. Here's how to get it from your network and use it safely.

What is a PUK code and how do you get one?

PIN vs PUK: what's the difference?

Your SIM can be protected with a 4 to 8-digit PIN, which you type when the phone starts. It's separate from your phone's screen lock. If someone enters the wrong PIN three times in a row, the SIM blocks itself to stop people guessing. To unblock it, you need the PUK (PIN Unblocking Key), an 8-digit code set by your network when the SIM was made.

CodeDigitsWho sets itAttempts before lock
SIM PIN4 to 8You (often off by default)3
PUK8Your network10, then the SIM is blocked permanently
Don't guess the PUK. After 10 wrong attempts the SIM is permanently disabled and you'll need a replacement. Get the real code from your network first.

Where to find your PUK

You'll usually find it in one of these places:

  • The SIM card holder: the credit-card-sized plastic the SIM came in often has the PUK printed on the back.
  • Your network's app or online account: most UK networks show the PUK after you sign in. This is the fastest route if you can get online on Wi-Fi or another device.
  • Customer services: call from another phone. They'll check your identity before giving you the code.

We have network-specific guides for getting your O2 PUK code and the EE PUK code, plus help for Vodafone and Three PUK problems.

How to enter the PUK

  1. When the phone shows "SIM PUK locked" or "Enter PUK", type the 8-digit PUK carefully and confirm.
  2. Choose a new SIM PIN. Pick something you'll remember, and avoid 0000 or your birth year.
  3. Enter the new PIN again to confirm it.
  4. Your SIM unlocks and reconnects to the network. You can turn the PIN off afterwards if you don't want it.

On some Android phones you can also enter the PUK from the keypad: dial **05*PUK*newPIN*newPIN#. Only do this if the on-screen prompt isn't appearing.

If the SIM is permanently blocked

If you see "SIM permanently blocked" or "PUK attempts exceeded", the SIM can't be recovered. Ask your network for a replacement SIM (usually free) and you'll keep the same number. Our guide to ordering a replacement SIM explains the steps. If your network offers eSIM and your phone supports it, switching to an eSIM can get you back online the same day.

Should you keep a SIM PIN on?

A SIM PIN stops someone from taking your SIM, putting it in another phone and using your number, for example to receive security codes sent by text. If you'd rather not type it, you can turn it off:

  • iPhone: Settings › Mobile Service › SIM PIN.
  • Android: Settings › Security › More security settings › SIM card lock (wording varies by brand).

Write your PIN and PUK down somewhere safe, away from your phone.

Frequently asked questions

What is a PUK code?
An 8-digit PIN Unblocking Key, set by your network, that unblocks your SIM after three wrong PIN attempts.
Where can I find my PUK code?
On the back of your SIM card holder, in your network's app or online account, or from customer services.
How many times can I enter the PUK?
Ten times. After the tenth wrong attempt, the SIM is permanently blocked.
Is my PUK the same as my PIN?
No. You set the PIN, while the network sets the PUK, and the PUK is always 8 digits.
Will I lose my number if my SIM is blocked?
No. Your network can send a replacement SIM with the same number.
Can I get my PUK without calling?
Yes, most UK networks show it in their app or online account.