![](https://help.apple.com/assets/65C13B8310C97C4CA5052A31/65C13B8510C97C4CA5052A49/en_GB/52d714626638d3391623c853be0c593b.png)
Set a unique passcode or password on Apple devices
To prevent anyone except you from using your devices and accessing your information, use a unique passcode or password that only you know. If you share a device or if others know your passcode or password, remember that they can see the information on your device or account and can change the device’s settings.
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. Your Mac password must have eight or more characters and include uppercase and lowercase letters and at least one number. You can also add extra characters and punctuation marks to make your password even stronger.
![A Mac, iPad and iPhone.](https://help.apple.com/assets/65C13B8310C97C4CA5052A31/65C13B8510C97C4CA5052A49/en_GB/2e24622a96c20c60aa9399f5a1e99acf.png)
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 and iPad data so that only someone who knows the passcode can access it.
Note: Your device passcode isn’t your Apple ID 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 digits) 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’d like 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 ID 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 using macOS 13 or later: Choose Apple menu
> System Settings, click General, click Users & Groups
, then click the Info button
.
On your Mac using macOS 12 or earlier: Choose Apple menu
> 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 the Key button
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 iPhone or iPad
To further increase personal privacy, you can set your device up to automatically lock after a certain amount of time has passed with no activity.
Go to Settings
> Display & Brightness > Auto-Lock, then set a length of time.