How to sync iphone contacts to Gmail?

I have read how to sync gmail contacts to iphone, but not the other way around. Anyone know? Thankyou
Are you using Exchange to sync your Google contacts? If so, go in Settings>Mail, Contacts, Calendars and scroll down to the default account setting for Contacts and make sure it's set to Exchange and not On My iPhone. Although I believe that will only work for contacts entered after you change that setting...for the others, I think you can export them as a CSV file and import them to Gmail, or maybe through iTunes.

(Or if you don't have that many, it may be easier just to add them manually and then delete the On My iPhone version.)
I was able to do it through Itunes. Thankyou 🙂

Original thread: https://forums.imore.com/threads/how-to-sync-iphone-contacts-to-gmail.218505/