If your iPhone is password protected and you'd like to perform a factory reset, you'll need to connect the device to your computer and perform the task in iTunes. iTunes contains a "Restore" option that will delete all of your content off of the device and return it to the way it was working the first time you turned it on. You don't need to know your iPhone password--you just need your iPhone's USB cable.
Step 1
Plug your iPhone into your computer via the USB cable.
Video of the Day
Step 2
Open iTunes.
Step 3
Click the "Settings" drop-down menu.
Step 4
Click the "General" tab from the "Settings" menu.
Step 5
Click the "Reset" button and select "Reset all iPhone Settings" to reset your iPhone without using your password.
references