The best way to mass update account and contact owners is directly within Salesforce. If you have the proper Salesforce privileges and access rights, use the “Transfer Accounts” link at the bottom of the Accounts tab. The Mass Transfer method will transfer all the related contacts, opportunities, notes, and activities belonging to the existing owner.

For more detailed instructions, read them here.