How do I reset a forgotten iPhone passcode when I still have Gmail access?
Answer
A forgotten iPhone passcode is cleared by erasing the iPhone with your Apple ID (via computer recovery or Erase iPhone / Find My), then signing back in. Keeping access to the Gmail address used for Apple ID or notifications makes account recovery and post-erase setup much faster.
Before you start: stop right away if…
- Erasing the iPhone permanently removes data that was not backed up.
- Third-party passcode unlock tools are often scams and can lock you out of Activation Lock.
Follow these steps
Confirm Apple ID and Gmail access first
On a computer or another phone, try signing into appleid.apple.com with the Apple ID used on the iPhone. If that Apple ID email is Gmail, open Gmail and confirm you can receive Apple verification messages.
You should see: You know whether Apple ID recovery is possible before erasing the phone.
Recover the Apple ID password if needed
If you forgot the Apple ID password, use Apple’s official forgot-password flow and complete email or trusted-device steps. Do not proceed with erase until you can unlock the Apple ID, or Activation Lock will block setup.
You should see: You can sign into the Apple ID successfully.
Erase the iPhone through an official path
Use Erase This Device / Erase iPhone from Find My on another device if available, or put the iPhone into recovery mode and restore with Finder (Mac) or the Apple Devices/iTunes app (Windows) using a cable.
You should see: The iPhone erases and shows the initial Hello / setup screen.
Set up again and restore a backup
During setup, sign in with the Apple ID, then restore from an iCloud or computer backup if one exists. Create a new passcode you will remember and store it in a password manager.
You should see: The iPhone unlocks with the new passcode and your backup data returns where available.
Not sure this is the right page? Check here
0 of 6 checked
Extra tips
What to look for: Whether you know the Apple ID email/password; whether Find My / Erase iPhone is available; whether the related Gmail inbox still opens
Before you change anything: Erasing an iPhone deletes data not already backed up to iCloud or a computer. Confirm you can open the Apple ID email (often Gmail) before starting erase. Use only official appleid.apple.com or Finder/iTunes recovery—not third-party “unlock” tools. Never share Apple ID codes with unexpected callers.