Someone has seen your iPhone passcode
Change the code, expire the old one and check Face ID and your Apple Account for anything you did not set up.
Change your passcode in Settings under Face ID & Passcode, then tap Expire Previous Passcode Now. iOS otherwise keeps the old code usable for 72 hours as a reset option. Next, check for an unfamiliar Face ID appearance and for devices on your Apple Account.
Maybe a friend watched you type it at dinner, or a coworker stood behind you in the elevator. A passcode opens more than the Lock Screen. It also opens your Hidden album, your Recently Deleted photos and notes locked with the device passcode. It can also approve changes to your Apple Account.
Change the code and end the old one
- Open Settings and tap Face ID & Passcode. Enter your current code.
- Tap Change Passcode.
- Tap Passcode Options if you want something stronger than six digits. Apple rates Custom Alphanumeric Code and Custom Numeric Code as the most secure choices.
- Go back to the same screen and tap Expire Previous Passcode Now.
The fourth step is easy to skip. In iOS 17 and later, the old code keeps working for 72 hours as a fallback for people who forget a new one. Anyone who knows your old code could use it during that window to set a new passcode, if they have the phone.
With Stolen Device Protection on, you may need to wait an hour if you are away from a familiar place when you change the code.
Check what they could have added
Someone with your unlocked phone has time to set up a way back in, so look at each of these:
- Face ID. In Settings, under Face ID & Passcode, check whether an alternate appearance has been set up. If you are unsure, tap Reset Face ID and set it up again with only your face.
- Devices. Go to Settings, tap your name and look through the device list. Remove anything you do not recognize.
- Trusted numbers and email. Sign in to your Apple Account page and review the contact details and trusted devices.
- Apps. Scan for apps you do not remember installing.
- Profiles. Look in Settings under General, then VPN & Device Management. A personal phone usually shows nothing there.
iPhone with iOS 16 or later also has Safety Check, in Settings under Privacy & Security. It walks you through people, apps and devices in one place.
Change the passwords the code could unlock
If the person may have seen saved passwords, or had time to use the phone, change your Apple Account password and the passwords for your email and bank. Saved passwords open with Face ID or the passcode unless Stolen Device Protection requires a biometric check.
Reduce the next risk
Shield the screen when you type the code, and use Face ID in public where you can. Turn on Stolen Device Protection in Settings under Face ID & Passcode. Choose Always under Require Security Delay if you want the protections at home too.
For photos, the passcode is still a single key to the phone and the Hidden album. Apps with their own secret add a second lock, and our guide to locking photos sets out the options.
If the person who knows your code is a partner and you feel watched or afraid, slow down before changing anything and read this page on monitoring. A sudden lockout can raise the risk in some relationships.
Frequently asked questions
Does my old passcode still work after I change it?
It can. In iOS 17 and later, Passcode Reset lets someone who is locked out use the previous passcode for 72 hours to set a new one. Tapping Expire Previous Passcode Now ends that window.
Can someone with my passcode change my Apple Account password?
Yes, unless Stolen Device Protection gets in the way. With it on and the phone away from familiar places, Apple requires Face ID or Touch ID plus a one-hour delay before that change.
How do I know whether someone went through my phone?
Apple's safety guides do not describe a log of who opened your photos. Look for changes you can check: devices on your account, a second Face ID appearance, unfamiliar apps and sharing you did not start.