I don't think you can do it easily from your phone. Best way might be to export the contacts, then import them to Google Contacts. Here are instructions on how to export contacts to a .csv file:
Then you can go to Google Contacts on your desktop browser, click on More/Import, and import that file. Once those contacts are imported into your Google account, they should then sync with your phone.