How to restore your iPhone if you forgot your passcode | Apple Support

If you forgot your iPhone passcode, you can reset it and restore from a backup. For iOS 17, tap “Forgot Passcode,” then “Start iPhone Reset,” erasing content. Enter your Apple ID, restore from a backup if available. For iOS 16 or earlier, tap “Erase iPhone,” enter Apple ID, restore backup. If wireless reset fails, use Recovery Mode. Hold side/top button, connect to computer. Follow on-screen prompts in Finder or iTunes to restore, update iOS. Confirm terms, wait for download. If longer than 15 mins, redo button presses. After restart, restore from backup if needed. Contact Apple Support if issues persist.

Summary:
– Forgot iPhone passcode: Reset and restore from backup.
– For iOS 17: Tap “Forgot Passcode,” erase content, restore backup.
– For iOS 16 or earlier: Tap “Erase iPhone,” restore backup.
– If wireless reset fails: Use Recovery Mode.
– Follow prompts in Finder or iTunes, confirm terms, restore from backup if needed, contact Apple Support if issues persist.