iCloud is useful for a lot of things and backing up your iPhone's data is one of them. Included in the data and files that you can safely keep using iCloud are your contacts. The following instructions detail how to transfer contacts from iPhone to computer.
Step 1. On your iPhone, tap on Settings. On the "Settings" menu, select "iCloud". You will then be taken to the iCloud Settings.
Step 2. Enable the "Contacts" setting and should you be informed that you'll have to merge your contacts to iCloud, tap "Merge".
Step 3. Now on your computer, go to iCloud.com and login with your iCloud credentials.
Step 4. Once you're logged in, click on the Contacts icon to access your address book and all iCloud features for the contacts you've uploaded.
Step 5. In the address book, click on the cog icon at the lower-left portion, click "Select All", and "Export vCard" afterwards.
Step 6. iCloud will then give you a vCard that you can store on your computer. It contains all the contacts you've uploaded to iCloud using your iPhone.