iCloud can keep all your contacts in sync across all your devices and on the web. Not only that, iCloud gives you the option to export your contacts right from iCloud.com. That's convenient for anyone who is adding new email services, switching services, or simply wants a local backup for extra peace-of-mind.
Once downloaded, you'll be able to import or upload the standard .vcf file type to any app or service that supports it.
How to save all your iCloud contacts to your computer from iCloud.com
Go to www.icloud.com in any web browser and log in to your iCloud account.
Click on Contacts.
Click on any contact in the All Contacts section and hit Command + A to select all (Control + A on Windows).
Click on the gear icon in the lower left hand corner.
Click on Export vCard...
On your Mac, you should be asked to import your contacts right into the Contacts app. On a Windows computer, you should have the option to save the archive wherever you'd like.
If you want to backup your data from the Mac's Contacts app instead of iCloud, you can do that too: