Forgetting your iPhone passcode is a stressful experience, especially if you don’t have easy access to a computer to help. Fortunately, Apple has built several ways to regain access to a locked iPhone using nothing more than another Apple device or an internet connection. Here’s what you can do — and what to expect along the way.
Important: This Will Erase Your iPhone
Before starting, it’s important to understand that unlocking a passcode-locked iPhone without the correct passcode requires erasing the device entirely, removing the passcode along with all data on the phone. This is by design — it’s Apple’s security system working as intended, preventing anyone (including a genuine owner who’s forgotten their code) from simply bypassing the passcode while keeping the data intact. If you have a recent iCloud backup, most of your data — photos, contacts, messages, and app data — can be restored once the phone is unlocked again.
Option 1: Erase iPhone via Find My iPhone (No Computer Needed)
If you have Find My iPhone enabled and access to another Apple device, or a web browser, this is the most straightforward route:
On another device, go to iCloud.com and sign in with the Apple ID associated with your locked iPhone (or open the Find My app on another Apple device).
Select Find iPhone and choose your locked device from the list.
Select Erase iPhone. This will remotely wipe the device, including the passcode.
Once erased, set up your iPhone again as new, or restore from an iCloud backup if you have one, which will bring back your photos, apps, and settings from before the phone was locked.
This method requires that Find My iPhone was switched on before you got locked out, and that you have access to the internet on another device to carry out the steps.
Option 2: Use “Erase iPhone” Directly on the Locked Device
Depending on your iOS version, some locked iPhones display an “Erase iPhone” option directly on the passcode entry screen after multiple failed attempts, particularly on more recent versions of iOS. If this option appears, you can select it and confirm using your Apple ID password to erase the device directly, without needing a separate device or computer at all.
Option 3: Visit an Apple Store or Authorised Service Provider
If you don’t have Find My iPhone enabled, or you’re unable to erase the device using the options above, visiting an Apple Store or an Apple Authorised Service Provider in person is a reliable route. Bring proof of purchase or ownership, as Apple staff will need to verify the device belongs to you before assisting with an unlock, which typically also involves erasing the device.
What Happens to Your Data?
In every scenario above, unlocking a passcode-protected iPhone without knowing the passcode results in the device being erased. This is why regular backups — either to iCloud or, when you do have access to a computer, to your computer via Finder or iTunes — are so valuable, as they let you restore your photos, messages, contacts, and app data once the phone is unlocked and set up again.
Preventing This in the Future
Once your iPhone is unlocked and set up again, consider these steps to avoid facing the same situation:
- Set up Face ID or Touch ID as your primary unlock method, reducing how often you need to manually enter your passcode.
- Enable Find My iPhone in Settings, so remote erase remains available if you’re ever locked out again.
- Turn on automatic iCloud backups, so a recent backup is always available to restore from.
- If you’re prone to forgetting passcodes, consider writing it down and storing it securely somewhere safe, separate from the device itself.
Final Thoughts
While it’s not possible to unlock a forgotten iPhone passcode while keeping your data intact, Apple’s built-in tools make it possible to regain access to a locked device without needing a computer at all, provided you have Find My iPhone enabled or access to an Apple Store. Restoring from a recent backup afterwards will get you back up and running with minimal data loss.
