Complete guide to PIN and PUK codes: what they are and how to unlock your SIM card

Last update: November 2, 2026
  • The PIN is the daily access code that protects your mobile line, while the PUK is the master key to unlock the SIM after several failed attempts.
  • Entering the PIN incorrectly three times triggers the PUK request, and failing ten times with the latter permanently disables the card.
  • Both codes are originally found on the SIM's plastic support, although the PUK can be retrieved through the operator.

Technical details of SIM cards and extraction tool on a white background

I'm sure it's happened to you: you turn on your phone and, as always, it asks for that four-digit code that's practically memorized. Almost everyone does it automatically, but the real drama begins when, due to carelessness or a lapse in memory, we enter the code incorrectly several times and our phone sends us a chilling message asking for the PUK code. That's when panic sets in and we realize we have absolutely no idea where that darn number is.

Don't worry, it's not that big of a deal. Understanding the difference between a PIN and a PUK is simpler than it seems , and knowing how to react when your SIM card acts up can save you the hassle of having to go to a physical store to get a replacement. Below, we'll tell you everything you need to know to manage these codes stress-free and keep your line always working.

What exactly is the SIM PIN?

Person entering the security PIN code on a smartphone screen

The PIN, which stands for Personal Identification Number , is essentially the first line of security for your SIM card. Its main purpose is to prevent anyone with your SIM from making calls, using your data, or reading your messages if your phone is stolen or lost. It's important to note that this code is linked to the SIM card, not the device, so don't confuse it with the pattern or password you use to unlock your home screen.

This code is usually 4 digits long , although some carriers allow you to extend it to 8. It's most commonly pre-set by the manufacturer, but you can change it to one you're more familiar with in your phone's settings. However, be careful: if you enter it incorrectly three times in a row , your SIM will be blocked for security reasons, and you'll be locked out of PUK territory.

The PUK code: your emergency lifeline

When the PIN fails, the PUK ( PIN Unblock Key ) comes into play . As its name suggests, it's the unlock key specifically designed to reactivate the SIM card when it's locked. It's a longer code, specifically 8 digits , that acts as a master key. Unlike the PIN, the PUK is unique to each card and cannot be changed under any circumstances.

This is where you need to tread carefully. While the PIN gives you three attempts, the PUK is much more forgiving but with a drastic end: you have up to 10 attempts to get it right . If you exhaust all your attempts and enter the code incorrectly ten times, the SIM card will be permanently unusable . At that point, there's no magic code that will help, and the only solution is to request a replacement SIM card from your phone company.

Quick Comparison: PIN vs. PUK

To clear up any doubts, here are the key differences summarized:

  • Length: The PIN usually has 4 digits, while the PUK always has 8.
  • Purpose: The first one is for everyday use; the second one is only for unlocking emergencies.
  • Modifiable: You can change the PIN whenever you want, but the PUK is fixed.
  • Error limit: The PIN is blocked after 3 incorrect attempts; the PUK disables the SIM after 10 incorrect attempts.

Where can I find these codes if I've lost them?

SIM card kit with adapter, tray and removal tool on a yellow background

The original and most reliable source is the plastic tray (about the size of a credit card) that the SIM card came in when you bought it. Both codes are usually printed there, sometimes hidden under a silver strip that you have to scratch off. However, it's very common for that plastic tray to end up in the trash after a few months.

If you don't have it, don't panic. You can retrieve your PUK code in several ways depending on your carrier: by accessing the customer area on their website , using the company's official app on another device, calling customer service (after verifying your identity), or visiting an official store in person.

Steps to unlock your SIM and renew your PIN

If your screen says "SIM locked. Enter PUK code", it's best to follow these steps carefully to avoid wasting attempts:

  1. Look for the PUK on the original plastic or Check it in your operator's app before writing anything.
  2. Enter the 8 digits of the PUK when the phone prompts you to do so.
  3. The system will then ask you to create a new PIN 4 digits. Choose one that you will remember but that is not obvious (avoid 0000 or 1234).
  4. Confirm the new PIN by repeating it a second time.

Advanced management: change or disable the PIN

If you want to avoid your phone asking for your PIN every time you restart it, you can disable it. On Android, it's usually found in Settings > Security > SIM card lock . On iPhone, the path is Settings > Cellular > SIM PIN . Keep in mind, however, that removing the PIN reduces the security of your SIM card.

If you prefer to change your PIN without going through the menus, you can try dialing the sequence *#04*old PIN*new PIN*new PIN# on the keypad. Keep in mind that you'll always need to know your current PIN for any changes; if you don't know it, don't try a random PIN or you'll end up needing your PUK code.

The case of eSIMs

Smartphone displaying an eSIM application for virtual connectivity during a trip

Virtual SIM cards, or eSIMs, operate under the same security principles. They also have their own PIN and PUK codes , but the difference is that, since there is no physical card, all management and retrieval of these codes is done exclusively through the customer area or the operator's app.

Having control of these codes is essential to avoid being left without communication. The smartest thing to do is take a photo of the original SIM card or save the PUK code in a secure password manager. That way, if your PIN ever fails, you'll have the solution ready and avoid the hassle of ordering a new SIM card and waiting for it to arrive.

Alberto navarro

Alberto Navarro

I am a sociologist, digital marketing expert and content writer at ActualidadBlog, passionate about technology, with a special focus on Android and video games for PC, consoles and mobile devices.

I have a curious mind like yours and I'm used to finding solutions to all kinds of problems related to the digital world, since I've shown a lot of interest in this subject since I was little.

Thanks to my years of experience in the sector, I will keep you informed of all the good and bad things about the Android operating system with fresh, informative and entertaining content for readers.