If you are a Gmail user make sure your contacts are synced, then open Contacts on the web and it can deduplicate and merge everything for you automatically. I’ve done this on multiple occasions.
If you don’t use Gmail, check with your email provider and see if they offer the same feature. If they don’t you could always set up a Gmail account, let it do the work for you, export a backup of the cleaned contacts, then delete everything.