So you bought a new phone and you want to sell your old phone, but you're worried about the buyer finding personal information on your phone. You can never be too careful, so it's important to know how to remove all that personal data before a stranger has the phone.
Before doing this, remember to backup all your data and transfer important files to your new phone. This includes pictures, documents, apps and app logins and media (music, videos and e-books). Some platforms and carrier networks provide some kind of backup service.
Next, make sure to delete everything from any storage media. Usually, this just means formatting the microSD card if your phone has one. Most phones have an option somewhere in the settings menu to format the memory card. This wipes the data completely. Another option is to simply keep the microSD card and use it in your new phone, as long as the new phone accepts storage media (the iPhone doesn't) and you make it clear to potential buyers that a microSD card isn't included in the phone you're selling.
The final and most important step is to perform a factory data reset, also known as a factory wipe or hard reset. In essence, the factory reset removes any personal data and apps and returns the phone to the default state the phone was in when you purchased it.
Android phones: A factory data reset can be done by going to Menu > Settings > Privacy > Factory data reset. Conversely, you can also dial *2767*3855# which will cause the phone to power off and then power back on in a factory reset. There is some inconsistency with how certain Android phones react to the dial reset, so it may not completely wipe some phones. Also keep in mind that rooted Android smartphones may react unpredictably to a factory data reset.
iPhones: The reset command is in the Settings menu under the General category. It's also possible to perform a factory data reset by connecting the phone to a computer and using iTunes. In the source list, click on the iPhone, then click on the Summary tab and choose Restore. You will have the option to restore to a backup copy of your data or "Set up as a new phone." Choose to set it up as a new phone and all personal data will be wiped.
BlackBerry phones: Go to Options > Security Options > General Settings > Menu > Wipe Handheld.
Windows Phone 7: Go to Settings > About > Reset Phone. There are also methods to perform a hard reset using just physical buttons (volume and camera buttons, for instance), but they vary based on manufacturer and model, so you'll need to look up the method for your specific device.