So you are having issues with your iPhone? Maybe you jailbroke it and things did not go as well as you planned? Perhaps you have to take your iPhone back to an Apple Store because of a hardware related issue and you are jailbroken? Well I will tell you how to restore you iPhone back to it's factory settings in a few simple steps.

Word of warning before you begin:

Restoring your device will erase all data from your iPhone or iPod Touch, including songs, videos, contacts, photos, calendar information, and any other data. All iPhone or iPod Touch settings are restored to their factory condition. More after the jump!

Step 1.

First thing to check is to make sure you have the latest version of iTunes installed on your Mac or Windows PC.

Step 2.

Connect your iPhone to your Mac or PC.

Step 3.

When your phone is detected, select it in iTunes under the list of devices. If your iPhone is not responsive and iTunes does not detect it we must put your phone in DFU mode. While it is connected, simply hold down the home and power button together for about 10 seconds, then release the power button while continuing to hold the home button. A few seconds later iTunes should detect your iPhone,

Step 4.

Select the "Summary" tab.

Step 5.

Select the "Restore" option.

Step 6.

You will now be prompted with a screen that asks if you wish to back up your iPhone before restoring. *If you are jailbroken, it is my personal opinion never to use a backup when restoring. Some may disagree, but in the end it is up to you.

Step 7.

Select the Restore option when iTunes prompts you.

Step 8.

Once the restore process has completed your iPhone will restart and the Apple logo will appear while booting up.

Step 9.

After the restore is complete and your iPhone restarts you will see the "Connect to Activate" screen. You must continue to keep your iPhone connected to complete activation.  

Step 10.

The final step is to restore your iPhone or iPod touch from a previous backup or to set your iPhone up as new. Once that is complete iTunes should detect your iPhone and you are good to go! *Jailbreakers - If you want to play it safe this is where you would like to set you iPhone up as new.