Two-factor authentication is an extra layer of security for your Apple ID, designed to make sure that you're the only one who can access your account—even if someone else knows your password. When you sign in with your Apple ID for the first time on a new device or on the web, you need both your password and the six-digit verification code that's automatically displayed on your trusted devices. Because just knowing your password isn't enough to access your account, two-factor authentication dramatically improves the security of your Apple ID and the data that you store with Apple.
Two-factor authentication is the default security method for most Apple IDs. Certain Apple services and features, such as Apple Pay and Sign in with Apple, require two-factor authentication. We recommend that you use two-factor authentication and protect your device with a passcode (or login password on Mac) and Face ID or Touch ID, if your device supports it.
Two-factor authentication requires iOS 9 or later, OS X El Capitan or later, or iCloud for Windows 5 or later. Learn where two-factor authentication is available.
Turn on two-factor authentication for your Apple ID
If you're not using two-factor authentication for your Apple ID, you can turn it on right on your device or on the web:
- On your iPhone or iPad: Go to Settings > [your name], then tap Sign-In & Security. Tap Turn On Two-Factor Authentication. Then tap Continue and follow the onscreen instructions.
- On your Mac: Choose Apple menu > System Settings, then click your name. Click Sign-In & Security. Next to Two-Factor Authentication, click Turn On and follow the onscreen instructions.
- On the web: Go to appleid.apple.com and sign in with your Apple ID. Answer your security questions, then tap Continue. Tap Continue when you see a prompt to upgrade account security. Then tap Upgrade Account Security and follow the onscreen instructions.
If you're already using two-factor authentication with your Apple ID, you can't turn it off. If you updated to two-factor authentication inadvertently, you can turn it off within two weeks of enrollment. If you do, your account is less secure and you can't use features that require a higher level of security.
The first time that you sign in with your Apple ID on a new device
When you sign in with your Apple ID user name and password for the first time on a new device or the web you might receive a notification on your trusted devices that someone is trying to sign in with your Apple ID. The notification might include a map of the approximate location of the sign-in attempt. This location is based on the new device's IP address and might reflect the network that it's connected to, rather than the exact physical location. If you know that you're the person trying to sign in but don't recognize the location, you can still tap Allow and view the verification code. If you're not the one trying to sign in, tap Don't Allow to block the sign-in attempt.
When you enter the verification code on your new device or the web, you verify that you trust the device on which you're signing in. You might also be asked to enter the passcode of one of your devices to access any end-to-end encrypted content stored in iCloud.
After you sign in, you won't be asked for a verification code on that device again unless you sign out completely, erase the device, or need to change your password for security reasons. When you sign in on the web, you can choose to trust your browser, so you won't be asked for a verification code again on that computer for 30 days.
If you don't have a trusted device with you
If you're trying to sign in and don't have a trusted device with you that can display verification codes, you can tap Didn't Get a Code on the sign-in screen and choose to send a code to one of your trusted phone numbers. This text message might include an additional domain validation line that includes the @ symbol, the website name, and your code (for example, @icloud.com #123456 %apple.com). Or you can get a code directly from Settings on a trusted device.
About trusted phone numbers and trusted devices
With two-factor authentication, a trusted device or trusted phone number helps verify your identity when you sign in to a new device or browser.
What is a trusted phone number?
To use two-factor authentication, you need at least one trusted phone number on file where you can receive verification codes. If you have a phone number that isn't associated with your trusted device, consider verifying it as an additional trusted phone number. If your iPhone is your only trusted device and it's missing or damaged, you won't be able to receive verification codes required to access your account.
To see, add, or change your trusted phone numbers:
- On your iPhone or iPad: Go to Settings > [your name], then tap Sign-In & Security. Tap Two-Factor Authentication, then tap Edit. From here you can remove an existing trusted phone number or add a new one.
- On your Mac: Choose Apple menu > System Settings, then click your name. Click Sign-In & Security, then add or remove a trusted phone number.
- Go to the Account Security section of appleid.apple.com.
What is a trusted device?
A trusted device is an iPhone, iPad, iPod touch, Apple Watch, or Mac that you've already signed in to using two-factor authentication. It's a device that we know is yours and that can be used to verify your identity by displaying a verification code from Apple when you sign in on a different device or browser.