WARNING! By factory resetting your phone, all your personal data stored on the device’s internal memory will be deleted, including media files and ringtones, apps, download, contacts etc. Furthermore all settings will be restored to factory values but data located on the SD and SIM cards won’t be affected.

NOTE: you can visit this thread for a guide on backing up and restoring data on the phone.

Factory Reset via Settings:

  1. Open “Settings
  2. Access “Backup & Reset
  3. If your device is protected by a lock screen, enter your PIN/password and tap “Continue
  4. Tap “Reset phone

Factory Reset via Android Recovery:

  1. If necessary turn the phone Off
  2. Press and hold “Power” and “Volume down” at the same time
  3. Once in the Boot Mode Selection menu, release the buttons
  4. Press “Volume down” repeatedly to navigate the menu and highlight “Recovery
  5. Press “Volume Up” to select the highlighted option
  6. At the “No Command” screen press and release “Power” and “Volume Up” several times until you access Recovery
  7. From the Recovery menu, press “volume down” to navigate and highlight “Wipe data/factory reset
  8. Press “Power” to select the highlighted option
  9. Then highlight “Userdata only” or “Userdata + personalized content
  10. Press “Power
  11. Lastly, highlight “Reboot system now” and press “Power

See More: Motorola Moto Z3: Factory Reset via Settings or Android Recovery