I had to do an iPhone factory reset because before I changed the main email address of an Apple ID from a non-existing email address to a new email address, the user of the iPhone didn't sign out (by going to Settings -> iTunes &amp App Store -> tap on the field says 'Apple ID' -> click Sign Out). But before doing a factory reset, I need to backup the contacts.

Note: Restoring from iTunes backup will also restore the old Apple ID.

In this scenario, I'm using a Windows 7 computer with iTunes 12.1.1 installed and an iPhone 4S.

To summarise the restoration, I will be backing up the iPhone using iTunes, then extract the contacts from the backup using iBackupViewer. Import the contacts (VCF files) to Windows Contacts. Restore iPhone, setup as new iphone, disable automatic sync then sync contacts from Windows contacts. Then sign in on iTunes and iPhone using the new Apple ID.


Backup iPhone using iTunes

Make sure you have the latest iPhone backup using iTunes.

  1. Plugin the iPhone to your computer.
  2. Select your iPhone then under Summary, click Backup Now.

Use iBackupViewer to extract your iTunes Backup

  1. Download and install iBackupViewer free version from http://www.imactools.com/iphonebackupviewer/
  2. Run iBackupViewer, then it will detect your iTunes backup files which will show on the left side.
  3. Expand the latest backup, then select Contacts
  4. Click Action, then Save All...
  5. Select a location where you want to save it and it will save all of your contacts individually as VCF.

Import Multiple VCF into Windows Contacts

  1. Go to C:\Users\%username%\Contacts
  2. Click the Import button then select vCard (VCF file)
  3. Browse to the location of your VCF files, then select all then click Open

Restore your iPhone using iTunes

  1. Connect your iPhone to your computer using the cable that came with it.
  2. Select your iPhone when it appears in iTunes. In the Summary panel, click Restore.
  3. Click Restore again to confirm. This will delete all data and content on your iPhone. iTunes will download the iOS software file and restore your iPhone.
  4. After your iPhone is restored to factory settings, it will restart. Once it does, you’ll see the "Slide to set up” welcome screen. Follow the steps in the iOS Setup Assistant. Set Up as New iPhone.
  5. Sign in with your NEW Apple ID.
  6. On iTunes, go to Edit -> Preferences -> Devices -> untick Prevent iPods, iPhones, and iPads from syncing automatically
  7. Click Info, make sure there is a tick on Sync Contacts with Windows Contacts
  8. Still under Info where it says "Replace information on this iPhone", tick Contacts then click Apply 
  9. Go to your iPhone and check your contacts. It may happen to loose your Contacts icon on your iPhone, if so, find and click your Extras icon and drag the Contacts icon from there to your home screen.