Set a unique device passcode or password
To prevent anyone except you from using your devices and accessing your information, set a unique passcode or password that only you know. If you share a device, or if others know your passcode or password, they’ll be able to view and make changes to the information on your device and associated Apple Account. If you believe someone else knows your device passcode or password and you want to set one that only you know, you can reset them in Settings or System Preferences, depending on the device (see instructions below).
Find out how: To view a task below, select the plus button next to its title.
Set a passcode on your iPhone or iPad
For better security, set a passcode that needs to be entered to unlock iPhone or iPad when you turn it on or wake it. Setting a passcode also turns on data protection, which encrypts your iPhone or iPad data so that only someone who knows the passcode can access it.
Note: Your device passcode isn’t your Apple Account password, which provides access to the iTunes Store, App Store, Apple Books, iCloud, and other Apple services.
Go to Settings , then do one of the following:
On your iPhone or iPad with Face ID: Tap Face ID & Passcode, then tap Turn Passcode On or Change Passcode.
On your iPhone or iPad with a Home button: Tap Touch ID & Passcode, then tap Turn Passcode On or Change Passcode.
To view options for creating a password, tap Passcode Options. Passcodes default to six digits, but options range from the least secure, four-digit, to most secure (alphanumeric).
Change passcode and expire the previous passcode on iPhone or iPad
If you’re concerned someone has access to your passcode and you want to secure your iPhone, you can change the passcode to protect your privacy and expire the previous passcode. To change your passcode, follow the steps below.
Go to Settings , then do one of the following:
On your iPhone or iPad with Face ID: Tap Face ID & Passcode, then enter your passcode.
On your iPhone or iPad with a Home button: Tap Touch ID & Passcode, then enter your passcode.
Tap Change Passcode, enter your current passcode.
If you want extra security, tap Passcode Options to select the format for your future passcode.
Available formats include a four-digit numeric code, six-digit numeric code, custom alphanumeric code, or custom numeric code.
Enter your new passcode twice.
IMPORTANT: After changing your passcode in iOS 17 or iPadOS 17, you can use your old passcode to reset your passcode for 72 hours. This is to protect against accidentally forgetting the new passcode. If you want to completely deactivate your old passcode after changing it, tap Expire Previous Passcode Now on the [Face ID][Touch ID] & Passcode page in Settings.
Change the login password on your Mac
If you’re concerned someone has access to your password and you want to secure your Mac, you can change the user password to protect your privacy.
Note: Your login password is the password you enter to unlock your Mac when you turn it on or wake it from sleep. Because you created it, it may be the same as your Apple Account password, which provides access to the iTunes Store, App Store, Apple Books, iCloud, and other Apple services.
Do one of the following:
On your Mac with macOS 13 or later: Choose Apple menu , select System Settings, click Users & Groups , then click .
On your Mac with macOS 12 or earlier: Choose Apple menu , select System Preferences, click Users & Groups , then click Change Password.
Click Change Password.
Enter your current password in the Old Password field.
Enter your new password in the New Password field, then enter it again in the Verify field.
For help choosing a secure password, click next to the New Password field.
Enter a hint to help you remember the password.
The hint appears if you enter the wrong password three consecutive times or if you click the question mark in the password field in the login window.
Click Change Password.
Automatically lock your devices
To further increase personal privacy, you can set your device up to automatically lock under certain conditions.
iPhone, iPad: Go to Setting > Display & Brightness > Auto-Lock, then set a length of time.
Mac: Choose Apple menu , select System Settings, then click Lock Screen in the sidebar (you may need to scroll down).
For more information, see Change Lock Screen settings on Mac in the Mac User Guide.
Apple Watch: Open the Settings app, tap Passcode, then turn Wrist Detection on or off.
For more information, see Lock automatically in the Apple Watch User Guide.