How can I completely erase all personal data from / reset my iPhone?
You may need to wipe your iPhone in order to sell it or get the device serviced or replaced. After all, the iPhone is a treasure trove of personal data with access to contacts, online accounts, and more.
To erase your personal data from the iPhone follow these steps:
1. Sync your iPhone with iTunes to back up your data for future use
2. Navigate to Settings -> General -> Reset
3. To reset all settings to factory defaults without deleting your music, contacts, etc. choose "Reset All Settings"
4. For a complete wipe of all personal data from the iPhone select "Erase All Content and Settings"
5. Confirm your selection when prompted
After the process is complete your private data is erased. If necessary you can reload your music and contacts, etc. by syncing the reset iPhone with iTunes.