Clean up Contacts’ phone numbers (remove unnecessary characters)

Hi everone,


I have lots of contacts in Apple Contacts (iCloud Sync active). The Contacts-App on macOS is formatting all numbers automatically very nicely, but behind the curtain it is an inconsistent mess. I can see this when I sync my iCloud contacts with a 3rd party system using an Application specific password.


If I look at my contacts there I can see that some have originally been saved without any spaces in them, others use a - (dash) or a single space between area code and number and so on.


Is there a relatively simple way to unify these with a common formatting? As I said the Contacts.app hides this and displays the numbers all in the same way, but they really aren’t saved like this which is obvious when syncing the contacts with something outside of the eco-system.

Posted on Sep 2, 2025 08:39 AM

Reply
5 replies

Sep 2, 2025 02:33 PM in response to Björn Herrmann

Björn Herrmann wrote:

Maybe I should’ve explained this better.

I think you didn’t understand what neuroanatomist was suggesting.

there is no simple way to edit all of those in Contacts so you need some other method. A vCard is just a text file which you can easily edit to remove those things, especially with some sort of an advanced search and replace routine.

The other way to edit all of those entries would be to use an apple script, which is somewhat convoluted and more difficult to set up than exporting a vCard and editing those entries.

Sep 2, 2025 11:09 AM in response to Björn Herrmann

Björn Herrmann wrote:



I have lots of contacts in Apple Contacts (iCloud Sync active). The Contacts-App on macOS is formatting all numbers automatically very nicely,

but behind the curtain it is an inconsistent mess. I can see this when I sync my iCloud contacts with a 3rd party system using an Application specific password.

but they really aren’t saved like this which is obvious when syncing the contacts with something outside of the eco-system.


Maybe you can paint a bigger picture here...


—Not sure what is "behind the curtain" (?)


—what specifically: "3rd party system using an Application specific password" (?)


— what are you referring to here for some insight—"outside of the eco-system"...(?)


Sep 2, 2025 02:29 PM in response to neuroanatomist

Maybe I should’ve explained this better. So here we go:


I am currently testing a FritzBox (german router) with its DECT FritzFon (wireless handset). The FB can use and sync an iCloud address book. This is done by creating an app-specific password which is used to connect the FB with my iCloud account. This then syncs all of my contacts and since this is also a DECT base station the contacts also sync with the phone.


I am testing this since I’m getting tired of updating the current phone’s integrated address book manually on a regular basis.


I already knew that the macOS Contacts.app retains the numbers internally exactly the way you initially entered them, but uses a standard formatting to display them to you which is based on the language setting in the app’s preferences. So this means I could have added a number to a contact by typing it in one of the following ways:


0123-456789

0123 456789

0123/456789

0123456789


and the number will in all cases be displayed as


0123 456789 (1 space between area code and number)


This is fine and correct, BUT behind the curtain it still resides in the database exactly the way it was originally typed in. And the above mentioned FritzBox displays them this way with no additional display formatting. Here’s an example:


macOS Contacts:


FritzBox address book:


You can see that the first number was originally added with a dash in this case.


@nueroanatomist: I just tried exporting and re-importing as vcard. The formatting does not change. It does change if I edit a phone number manually though. In this case the dash will get automatically removed as a side effect.


PS: The numbers in the screenshots are not real so there’s no need to obfuscate them…

Sep 3, 2025 05:11 AM in response to Björn Herrmann

I can answer my own question and I already had everything needed on my Mac. The excellent Exporter for Contacts 2 from https://www.subclassed.com/ can export contacts in various ways. I had used v1 in the past to create csv formatted address books from vCards for software which didn't support vCards.


I created a test contact with several phone numbers using different formatting for each while typing them in. Contacts.app would immediately display them uniformly without any special characters upon changing to the next input field. But exporting the vCard revealed the numbers I actually had typed:


As you can see I used different methods for each number:

home: -

work: /

mobile: +49 and spaces


I then added the vCard to the above mentioned app and selected to remove spaces and special characters. It exported the file like this:



If I import this vCard into Contacts.app the numbers display exactly the same as before, because Contacts.app does its own display formatting, but in reality they are now formatted the new way which I can confirm by again exporting and inspecting the vcf file.

Clean up Contacts’ phone numbers (remove unnecessary characters)

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.