To Reformat iPhone, restoring the factory settings, with new iOS version:
you can do a Hard Reset of the iPhone
Hold down the power button and the home button till the phone is completely off and stops restarting...
Then Holding the Home Button press the power button to turn the phone on.
Keep the home button held till you see the Connect to iTunes Image.
Connect it to iTunes and it will tell you that you must recover the phone.