Smart Systems for Home

Plain how-to guides for smart home, security and home Wi-Fi

Change iCloud Keychain Security Code If Forgot

· 5 min read · Home Security

In this article
  1. What Is the iCloud Keychain Security Code?
  2. How to Reset Your Security Code on iPhone or iPad
  3. How to Reset on a Mac
  4. What Happens to Your Saved Passwords?
  5. How to Choose a New Security Code
  6. Common Problems and Solutions
  7. Alternatives to iCloud Keychain
  8. Frequently Asked Questions

If you forgot your iCloud Keychain security code, you can reset it from your iPhone, iPad, or Mac by turning off iCloud Keychain and turning it back on, or by using the “Forgot Security Code” option during setup. This article explains exactly how to do that, what happens to your saved passwords, and how to avoid losing data in the process.

What Is the iCloud Keychain Security Code?

iCloud Keychain is Apple’s password manager that stores your website logins, Wi-Fi passwords, credit card information, and other sensitive data across your Apple devices. The security code is a separate passcode you create when you first enable iCloud Keychain. It is used to encrypt your keychain data on Apple’s servers, so Apple itself cannot read your passwords. You might use this code when you set up a new device or when you want to approve another device’s access to your keychain.

If you forget this code, you cannot retrieve it directly—Apple does not store it. However, you can reset it, but the process may erase your saved keychain data depending on your settings and whether you have a recovery method set up.

How to Reset Your Security Code on iPhone or iPad

On an iPhone or iPad, the reset process is straightforward. Follow these steps:

  1. Open Settings and tap your name at the top.
  2. Tap iCloud → Passwords & Keychain.
  3. Turn off iCloud Keychain (or tap “Turn Off” if prompted).
  4. Wait a few seconds, then turn it back on.
  5. You will be prompted to enter your Apple ID password. After that, you can choose to Reset Security Code or Use a Recovery Contact.

If you choose “Reset Security Code,” your keychain data will be removed from iCloud and you will start fresh. If you have a recovery contact set up, you can call them to get a temporary code that lets you reset your security code without losing your data.

How to Reset on a Mac

On a Mac, the process is similar but located in System Settings (or System Preferences on older macOS versions):

  1. Open System Settings (or System Preferences) and click your Apple ID.
  2. Click iCloud → Passwords & Keychain.
  3. Turn off iCloud Keychain and confirm.
  4. Turn it back on and follow the prompts to reset your security code.

As with iOS, you’ll be asked to authenticate with your Apple ID password. Then you can either reset the code (which erases your iCloud Keychain data) or use a recovery contact if available.

What Happens to Your Saved Passwords?

This is the most common concern. Here’s what actually happens:

  • If you reset the security code without a recovery method: Your iCloud Keychain data is deleted from iCloud. However, your passwords may still exist on your devices if you have them saved locally (e.g., in Safari’s AutoFill on that device). They will no longer sync across devices.
  • If you use a recovery contact: You can regain access without losing your keychain data. The recovery contact receives a code that you enter, and then you can create a new security code.
  • If you have a device that still has your keychain unlocked: You might be able to export or view your passwords before resetting, but there is no official “export” feature for iCloud Keychain.

To avoid losing data, always set up a recovery contact before you need it. Go to and choose a trusted person.

How to Choose a New Security Code

When you create a new security code, Apple requires at least six digits. You can also use a longer alphanumeric code if you prefer. Here are some tips:

  • Use a code you don’t use for anything else.
  • Avoid obvious sequences like 123456 or your birthdate.
  • Consider using a passphrase (e.g., “BlueFalcon42!”) if you want stronger security.
  • Write it down and store it in a safe place—Apple cannot recover it for you.

Remember that this code is separate from your device passcode and your Apple ID password. It’s specifically for encrypting your keychain data.

Common Problems and Solutions

Here are a few issues you might run into:

  • “Security Code Required” pop-up on a new device: This happens when you try to use iCloud Keychain on a device that doesn’t have the code. You can enter the code if you remember it, or reset it as described above.
  • Recovery contact doesn’t work: The recovery contact must be at least 13 years old, have an Apple device with iCloud Keychain enabled, and be in your Contacts. If they don’t meet these criteria, the option won’t appear.
  • You don’t see the “Forgot Code” option: On some versions of iOS/macOS, you may need to turn off iCloud Keychain entirely and then turn it back on to see the reset option.
  • Passwords are gone after reset: If you didn’t have a recovery contact, your keychain data is erased. You’ll need to re-enter your passwords manually or use a third-party password manager going forward.

Alternatives to iCloud Keychain

If you frequently forget your security code, you might consider a third-party password manager that offers a master password recovery option (e.g., through a recovery key or biometric authentication). However, iCloud Keychain is built into Apple devices and offers seamless integration. If you switch, you’ll need to manually transfer your passwords, which is not supported by Apple.

Frequently Asked Questions

Can I recover my iCloud Keychain security code without resetting?

No. Apple does not store your security code, so there is no way to retrieve it. The only options are to reset it (and lose data if no recovery contact is set) or use a recovery contact to set a new code without data loss.

Will resetting my security code delete my passwords from my iPhone?

Not necessarily. If you have passwords saved locally on your iPhone (e.g., in Safari AutoFill), they will remain on that device. What gets deleted is the encrypted copy stored in iCloud. However, any passwords that were only in iCloud Keychain and not on the device will be lost.

How do I set up a recovery contact for iCloud Keychain?

On your iPhone or iPad, go to and follow the prompts to choose a trusted contact. On a Mac, go to System Settings → Apple ID → iCloud → Passwords & Keychain and click “Recovery Contact.”

What if I don’t have a recovery contact and I reset my code?

Your iCloud Keychain data will be erased from iCloud. You can start a new keychain, but you’ll need to re-enter your passwords and card information manually. This is why it’s recommended to set up a recovery contact in advance.

Can I use my device passcode instead of the security code?

No. The security code is separate from your device passcode. Your device passcode unlocks your phone, but the security code encrypts your keychain data in iCloud. You can’t use one in place of the other.