Extract WhatsApp Chats and Messages From WhatsApp Backup File on iPhone or Android

WhatsApp is probably the most used messenger App to communicate across the mobile platforms including Windows Phone, Android, Blackberry and iOS (iPhone and iPad). Its also available globally so that you can send messeges across the globe for free. Its so popular that generally its the first app that is installed on a new mobile device. People even install WhatsApp on devices without SIM card.

If you are reading this, you probably already use WhatsApp. Do you know that all your WhatsApp chats are saved in an encrypted form on your device? So if you lost your WhatsApp data somehow, you can restore WhatsApp data from its backup file.

Even if your WhatsApp data is safe, you might still want to open the WhatsApp backup file to read all the messeges on a single page, instead of continuously pressing the ‘load older messages’ button. You can also search within your WhatsApp data after you decrypt it from its backup file.

How To Extract or Decrypt WhatsApp Backup File

1. First find the WhatsApp database backup file and copy it on your computer.

If you use WhatsApp on an Android device, the WhatsApp database backup file is,

/sdcard/WhatsApp/Databases/msgstore.db.crypt

If you have already rooted your Android device, you can also use the following files for WhatsApp backup,

/data/data/com.whatsapp/databases/msgstore.db
/data/data/com.whatsapp/databases/wa.db

If you extract the WhatsApp databse from msgstore.db or wa.db files, the name and phone number of a WhatsApp contact will also be displayed in the extracted file.

If you use WhatsApp on iPhone, the WhatsApp backup file is,

net.whatsapp.WhatsApp/Documents/ChatStorage.sqlite

If you don’t see this file, you can create it manually. To create a backup of your WhatsApp data on your iPhone, first connect it to your computer and start iTunes, and create a full unencrypted backup of your iPhone data.

Now download and install the iPhone Backup Extractor. Run the program and select the iPhone backup file your just created. Click on ‘Expert Mode’ in bottom right corner.

iphone-backup-extractor

Then click Application, find and select net.WhatsApp.WhatsApp and then click on Extract Selected.

backup-whatsapp-data-android

In the extracted data, the file ChatStorage.sqlite contains all your WhatsApp data backup. You can find it by clicking Extract selected option.

2. Now download WhatsApp Xtract package on your computer and extract it.

3. Now download and install Python programming language environment on your computer. Download the 32bit or 64bit version depending upon whether you are running the 32 bit or 64 bit version of Windows.

Update: Always download the 32 bit version of Python irrespective of the version of Windows you are running. Its reported that the 64 bit doesn’t work at all but the 32 bit version of Python works fine on 64 bit Windows.

Python is a programming language. But don’t worry, its not necessary to know how to program to follow this tutorial to extract the WhatsApp backup file. You just need to follow the steps and it will work just fine.

4. Now open the folder where you downloaded the WhatsApp Xtract archive. Find a file with name !install pyCrypto.bat, right click on it and click run as administrator. This bat file will execute the following Python command,

pypm install pycrypto

This comman automatically installs the pycrypto library on your computer, which will be used to decrypt the WhatsApp backup data.

5. Now in the same folder, run either whatsapp_xtract_iphone.bat, whatsapp_xtract_android_crypted.bat or whatsapp_xtract_android.bat depending upon the backup file you used. To run any of these files, simply right click on it and click run as administrator, just like above.

You can also run whatsapp_xtract_console.bat to specify the WhatsApp backup file manually,

/* For Android DB: */
python whatsapp_xtract.py -i msgstore.db -w wa.db

/* if wa.db is unavailable */
python whatsapp_xtract.py -i msgstore.db

/*for crypted db*/
python whatsapp_xtract.py -i msgstore.db.crypt

/*For iPhone DB*/
python whatsapp_xtract.py -i ChatStorage.sqlite

That’s it. As soon as the execution of the bat file or command is completed, all your WhatsApp backup data will be decrypted and will be displayed in the default browser on your computer.

whatsapp-backup-data-extracted-decrypted

You can now check all your WhatsApp chat messages! Enjoy the nostalgia.

Leave a Comment