There is an option in the iOS Settings menu which allows you to delete and wipe practically everything on your iPhone. To access this setting, go to Settings > General > Reset. In this category, choose Erase All content and Settings. This option will delete all content on the phone. This is practically a factory reset, only that it's for iOS devices. It works on iPhone and iPads as well.