Use your old passcode
-
If you changed the passcode in the last 72 hours, tap Forgot Passcode? on the Unavailable screen.
-
Tap Enter Previous Passcode and type the old one.
-
Follow the steps to set a new passcode straight away.
Erase the iPhone without a computer
-
Keep entering the passcode until iPhone Unavailable appears. The iPhone needs Wi-Fi or mobile data, and Find My must have been on.
-
Tap Forgot Passcode? at the bottom of the screen.
-
On the Security Lockout screen, tap Start iPhone Reset.
-
Enter your Apple Account password to sign out, then tap Erase iPhone.
-
When it restarts, set it up again and restore your data from a backup.
Use a computer
-
If Forgot Passcode? does not appear, connect the iPhone to a Mac or a PC with the Apple Devices app.
-
Put the iPhone in recovery mode with the button steps for your model.
-
Choose Restore on the computer. This erases the iPhone and installs iOS again.
If it still does not work
There is no way to remove the passcode without erasing the iPhone, unless you still have the old one within 72 hours. Your data comes back only from an iCloud or computer backup. After the erase you need the Apple Account password to get past Activation Lock.


