Below are the steps to reset the passcode on an iPhone.
Warning: this will wipe all files, settings, and apps from the iPhone, including the passcode
- Need computer (with iTunes) and USB cable
- Make sure iTunes in running on your system
- Press and hold the Home and Power button at the same time until the iPhone turns off
- Release the Power button, but continue to hold the Home button
- Plug the USB cable into the computer & iPhone (while holding the Home button)
- Continue to hold the Home button until an alert message in iTunes appears that reads “iTunes has detected an iPhone in recovery mode. You must restore this iPhone before it can be used with iTunes.” – click OK
- In iTunes, under “summary” tab, click the “Restore” button to restore the iPhone