I am currently in the act of cleaning up the contacts on my Gmail account. I have to replace all the numbers with "04" at the beginning to +61 444 444 444 but most of them are in the format such as 0444444444. Instead of manually opening each one and improving the format of each number, is there a quicker and efficient way of doing this? I have roughly around 2000 contacts.

  • You say Gmail but then you start talking about contacts. Your best bet is to export your contacts, use a powerful text editor to do a global search-and-replace, then re-import your contacts. If that's not what you're after, please edit your question to clarify what it is you're trying to do.
    – ale
    Jul 15, 2013 at 11:56
  • My contacts that are synced to my gmail address, e.g: All my contacts that are on my phone sync to my gmail account and it also shows up in the "contacts" part of gmail.
    – Akash
    Jul 15, 2013 at 12:01
  • I have tried to edit your question to indicate what it is you're actually trying to do.
    – ale
    Jul 15, 2013 at 12:16

2 Answers 2


Export your contacts

  1. Go the Contacts part of Gmail (or go to contacts.google.com
  2. Open the "More" menu
  3. Choose "Export..."
  4. Choose the contacts to export (a particular group or All; you might want to start with a small group at first)
  5. Choose the format to use. Google.csv is probably best to avoid incompatibility issues
  6. Download the file

Edit your contacts

  1. First, make a copy of the file. That way if something gets messed up you can always import the original
  2. Use a text editor to find-and-replace what it is you want to change. I use Notepad++, but you can use just about anything; even notepad.exe is probably fine for this, as long as it doesn't mess up the carriage returns
  3. Save the file

Import your contact data

This will require a leap of faith, because you probably want to delete all of the contacts out of Gmail (or, at least, the ones you downloaded). If you don't, this will still work, but you'll want to merge your duplicates, and you'll end up with contacts that have both the "new" and "old" phone numbers

  1. Check the "select all" checkbox to select all the contacts. If you've only exported and edited a subset, only select them. Delete them.
  2. Open the "More" menu
  3. Choose "Import..."
  4. Import the file you edited

Et voilà!

p.s., Of course, instead you could actually make your contacts do all the work themselves. I've had mixed results.


Just use Google Apps Script to fix the phone numbers:

Assign all to be corrected contacts to a special group.

Run a script like:

function phoneCleanup(){
  var groupToCleanup = ContactsApp.getContactGroup('theGroupName');
  var contactsToCleanup = ContactsApp.getContactsByGroup(groupToCleanup);
  for ( var i=0; i < contactsToCleanup.length; i++) {
    var phoneEntries = contactsToCleanup[i].getPhones();
    for ( var j=0; j < phoneEntries.length; j++) {
      var phoneNumber = phoneEntries[j].getPhoneNumber();
      // reformat the phone number here

The simplest way to GAS here is to create a new script file in Drive and run the function from script editor.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.