Windows Phone - How to reset your phone to factory settings
How to reset a Windows Phone 8 device to factory settings?
The procedure is simple, but it should be noted that all your personal settings and files will be deleted. Syncing your device with a Microsoft account, will allow you to restore your contacts and apps once the reset procedure is over.
From the Start screen, swipe to the left to access the App list.
Go to Settings > About > Reset your phone.
Confirm the warning messages by tapping on Yes.
Know issues: During the reset procedure your phone freezes on the following screen:
Press and hold the Power and Volume keys for a couple of seconds (until the phone vibrates). Upon releasing the keys the reset procedure will resume.