How do I change the 4 digit lock code on my iPhone?

Changing the 4 digit lock code on your iPhone is a quick and easy process that can be done right from the Settings app. The 4 digit code, also sometimes called a passcode, is used to unlock your iPhone and provides an extra layer of security for your device. Having a strong passcode that is changed periodically is important for protecting the sensitive information stored on your iPhone. In this article, we will walk through the steps for changing your iPhone’s 4 digit passcode to something new.

What is the 4 digit lock code on the iPhone?

The 4 digit lock code on the iPhone, also referred to as a passcode, is a 4 digit numerical code that is used to unlock the device. When enabled, your iPhone will require this code to be entered each time you turn on or wake up the device before allowing access.

The passcode provides a first layer of security for your iPhone, protecting your personal information and settings in the event that your device is lost or stolen. Even if someone gains physical access to your iPhone, they will not be able to access the contents without knowing the passcode.

Apple allows passcodes that are 4, 6, or arbitrary length alphanumeric codes. The 4 digit numerical passcode is the default option and offers a good balance of security and convenience for most users.

Why change your iPhone’s passcode?

Here are some common reasons you may want to change your iPhone passcode:

  • You can’t remember your current passcode
  • Standard security practice to periodically update passwords/passcodes
  • Concern that someone else has learned your passcode
  • Recently had your iPhone lost or stolen
  • About to sell or gift your iPhone to someone else

Having the same passcode for extended periods of time increases the risk of it being compromised. It’s good security practice to periodically change your passcode to something new that would be hard for another person to guess. This prevents unauthorized access to your iPhone even if your old passcode was compromised.

Requirements for the iPhone passcode

The iPhone has some requirements that must be met when creating a 4 digit passcode:

  • Must be exactly 4 digits in length
  • Cannot contain repeating (1111) or sequential numbers (1234)
  • Must be numeric – cannot contain letters or special characters

Make sure the new passcode you choose meets these requirements. If you want to use something longer or more complex, you can switch to a 6 digit numeric code or an alphanumeric passcode in the Settings instead. But a properly constructed 4 digit code provides sufficient security for most iPhone users.

How to change your iPhone’s 4 digit passcode

Changing the passcode on your iPhone is simple and can be done in just a few steps:

  1. Open the Settings app on your iPhone.
  2. Scroll down and tap on the Face ID & Passcode option (on iPhone X or later) or Touch ID & Passcode (on older iPhones).
  3. Enter your current passcode when prompted.
  4. Tap on Change Passcode.
  5. Enter your new 4 digit passcode.
  6. Re-enter the new passcode to confirm.
  7. Tap Done when finished.

You will immediately need to enter the new passcode to unlock your iPhone. Make sure you remember the new code!

If you have Apple Watch set up to unlock your iPhone, you may also need to enter the new passcode on the watch as well for it to continue working properly.

Choosing a strong and secure 4 digit passcode

When selecting a new 4 digit passcode for your iPhone, make sure you avoid common or easily guessable number combinations:

  • Avoid simple patterns like 1234, 1111, 0000
  • Don’t use repeating digits (3333) or sequential numbers (3456)
  • Avoid using familiar dates like birthdays or anniversaries
  • Don’t use a pattern like a phone number or address
  • Avoid choosing something related to you like a nickname or favorite number

Instead, choose a more random 4 digit code that wouldn’t be easily guessed. You can base it on a number pattern that is meaningful to you but not obvious to others.

Some tips for creating a strong passcode:

  • Pick a starting number and go up or down by random amounts for the remaining digits
  • Choose two random 2-digit numbers and combine them
  • Use the last 4 digits of a familiar phone number and change one or two digits
  • Think of a 4 digit number with no significance and change one digit

Avoiding common passcode patterns and putting some thought into your code will go a long way towards keeping your iPhone secure.

What to do if you forgot your passcode

If you attempt to change your iPhone passcode and realize you have forgotten your current code, don’t panic. You have a few options:

  • Try your most commonly used passcodes. We often fall back on familiar patterns without realizing it.
  • Ask Siri to call a trusted contact. Siri does not require a passcode to use. You can ask Siri to call someone who could hopefully remind you of your forgotten passcode.
  • Erase your iPhone. As a last resort, you can erase your iPhone which removes the passcode requirement. However, this will also delete all of your data and settings on the device.

If none of those options work, your only recourse is to perform a full reset and restore on the iPhone using iTunes or Finder on a computer. This is detailed in a section below.

What if I recently changed my passcode and forgot it?

In the event you just changed your iPhone passcode but have already forgotten the new code, you have a couple different options:

  • Use your Apple Watch or iPad to unlock. If you have an Apple Watch paired to your iPhone, it can bypass the iPhone passcode for up to 8 hours after the code was last entered on the watch. An unlocked iPad can also bypass the iPhone passcode if you have iTunes Wi-Fi Sync enabled between the devices.
  • Erase your iPhone. As mentioned above, erasing the iPhone will remove the passcode requirement but also delete all of your device’s data.
  • Restore with iTunes/Finder. Connecting your iPhone to a computer and restoring will reset the device to factory default settings, removing any newly created passcode.

Next time you change your passcode, be sure to save the new code somewhere secure in case you need to reference it later if forgotten.

Reset iPhone passcode with iTunes or Finder

If you cannot recall your passcode and none of the other options have worked, the last resort is to connect the iPhone to a computer and perform a restore. This will completely reset the device and remove any passcode:

  1. Connect the iPhone to a computer using a USB cable.
  2. Open iTunes on a Windows PC or Finder on a Mac.
  3. Select your iPhone and then choose to Restore or Restore iPhone.
  4. Follow the on-screen instructions to complete the restore process.
  5. The iPhone will reset to factory settings without a passcode requirement.
  6. You can then set up the device from scratch and create a new passcode.

This will reset your iPhone completely, so make sure to have a recent backup through iTunes, iCloud, or Finder so you can restore your data after the reset.

Set up a new passcode after resetting iPhone

Once you have erased your iPhone and restored it to factory default settings using iTunes or Finder, you will be able to set up the device as new or restore a backup to repopulate your data and settings.

As part of the setup process, you will need to create a new 4 digit passcode for your iPhone:

  1. Follow the onscreen setup prompts for your iPhone.
  2. Select a language and your country or region.
  3. On the passcode screen, tap Passcode options.
  4. Select 4 Digit Numeric Code.
  5. Enter your new passcode twice to confirm.
  6. Complete the rest of the iPhone setup process.

Your new passcode will be required to unlock the iPhone going forward. Be sure to write it down or save it somewhere secure in case it is forgotten again in the future.

Alternative password options for iPhone

Instead of using a 4 digit numeric passcode, you have a few other passcode options for your iPhone:

  • 6 digit numeric code – Provides over 1 million possible combinations, making it harder to guess.
  • Custom alphanumeric code – Create a complex passcode with uppercase letters, lowercase letters, numbers, and symbols for the strongest security.
  • Face ID – Use facial recognition to unlock your iPhone X or newer.
  • Touch ID – Use your fingerprint to unlock models with a Home button and Touch ID sensor.

If you want to use something more secure than a 4 digit passcode, you can set these alternate options up in the Settings app. Just make sure to remember your new passcode!

Frequently Asked Questions

How do I turn off the passcode on iPhone?

You can disable the passcode requirement completely by going to Settings > Face ID & Passcode and entering your current code, then turning off the iPhone Unlock switch. However, this will remove all passcode security from your device.

Can someone bypass my iPhone’s passcode?

In general, a 4 digit iPhone passcode cannot easily be bypassed without completely resetting the device. However, law enforcement agencies may have tools to access locked iPhones if they have legal authorization.

How secure is a 4 digit iPhone passcode?

While longer and more complex passcodes are more secure, a properly constructed 4 digit passcode is still reasonably strong. With 10,000 possible combinations, it would require significant effort to guess correctly or brute force the code.

How often should I change my iPhone passcode?

Most security experts recommend changing your iPhone passcode at least every 90 days, if not more frequently. Periodically updating your passcode helps protect against it being compromised.


Knowing how to change your iPhone’s 4 digit passcode is important for keeping your device and the sensitive personal information on it secure. Make sure to periodically change your passcode to something new that would be hard for someone else to guess. Avoid repeating or sequential numbers.

If you forget your existing passcode, you can erase your iPhone to reset it or perform a full restore with iTunes/Finder. Just be sure you have a recent backup so you can recover your data. With a few simple steps, you can set a new 4 digit passcode and be back up and running quickly.