How to Bypass iPhone Codes

The iPhone pass code is a security feature that secures your information by asking for a four-digit or custom pass code to unlock the device. If you happen to forget the pass code and need access to your iPhone, you must restore the software to its original settings, followed by restoring your device's information to a date prior to creating a pass code.

...
Restore a previous backup to bypass a forgotten iPhone pass code.

Step

Open iTunes. Plug the docking cable into your iPhone and into the computer's USB drive.

Step

Right-click "iPhone" in the iTunes side window, and click "Restore."

Step

Click "Don't Back Up." Wait for the iPhone's software to be reinstalled, and click "Restore from backup."

Step

Select an earlier backup date in the iPhone setup window, and click "Continue."