Whether you want to reinstall your iPhone as new or simply you want to sell or give it away to someone else entirely, then the very first thing which you need to make sure you have wiped it clean and erased all of your personal data, that includes photo, audio, video, social bookmarks, message etc. and make sure that your data remains protected.
Important Note:- Before you starts wiping your old iPhone, try to make sure that you have proper iPhone data backups available; so that you can further use it whenever required.
Steps to Erase iPhone Data:-
1.First Launch the Settings app from the Home screen of your iPhone or iPad
2.Now tap on General
3.Scroll all the way to the bottom and tap on Reset
4.Tap on Erase All Content and Settings
5.Tap on Erase iPhone
6.Tap on Erase iPhone again to confirm
7.Enter your Passcode
8.Enter your Apple ID password to turn off Activate Lock and remove the device from Find my iPhone
Once the iPhone data wiping process gets finished, then you can set up as a new device, restore from a different backup, or give or sell your iPhone to someone else.