Time needed: 15 minutes.
If you can’t access a Mac or a Windows PC and your iPhone is in a working condition, you can restore it to the factory settings without needing iTunes. If the iPhone is unusable, then you’ll need a computer and iTunes. For this guide, we are going to assume you have a usable iPhone in hand.
Backup your iPhone
Restoring an iPhone means all data on the device will be permanently deleted. Make sure you backup all your photos and other important files to either iCloud or any other storage device/service.
Go to Settings » General » Reset
Open the Settings app on your iPhone, then tap General and then select Reset. On the reset screen, tap Erase All Content and Settings option.
(optional) Upload data to iCloud
If you’ve iCloud enabled, you’ll get a pop-up to Finish Uploading Then Erase, if documents and data aren’t uploaded to iCloud. Select it.
If asked, enter your Passcode and Restrictions Passcode to reset your iPhone.
Tap Erase iPhone
Finally, tap the Erase iPhone on the pop-up menu and wait until the reset process finishes.
That’s it. When the reset is finished, your iPhone will be restored to the factory settings. Cheers!