Go to Settings > Backup & reset > Factory data reset
Keep in mind that this will erase everything in your phone. Backup your files first before doing this.