A customizable Android and iPhone Whatsapp database parser that will give you the history of your Whatsapp conversations in HTML and JSON.
If you plan to uninstall WhatsApp or delete your WhatsApp account, please make a backup of your WhatsApp database. You may want to use this exporter again on the same database in the future as the exporter develops
If you want to use the old release (< 0.5) of the exporter, please follow the old usage guide
First, install the exporter by:
pip install whatsapp-chat-exporter
Then, create a working directory in somewhere you want
mkdir working_wts
cd working_wts
Extract the WhatsApp database with whatever means, one possible means is to use the WhatsApp-Key-DB-Extractor
After you obtain your WhatsApp databse, copy the WhatsApp database and media folder to the working directory. The database is called msgstore.db. If you also want the name of your contacts, get the contact database, which is called wa.db. And copy the WhatsApp (Media) directory from your phone directly.
And now, you should have something like this in the working directory.
Simply invoke the following command from shell.
wtsexporter -a
In order to support the decryption, install pycryptodome if it is not installed
pip install pycryptodome
Place the decryption key file (key) and the encrypted WhatsApp Backup (msgstore.db.crypt14) in the working directory. If you also want the name of your contacts, get the contact database, which is called wa.db. And copy the WhatsApp (Media) directory from your phone directly.
And now, you should have something like this in the working directory.
Simply invoke the following command from shell.
wtsexporter -a -k key -b msgstore.db.crypt14
Do an iPhone Backup with iTunes first.
If you are working on unencrypted iPhone backup, skip this
If you want to work on an encrypted iPhone Backup, you should install iphone_backup_decrypt from KnugiHK/iphone_backup_decrypt before you run the extract_iphone_media.py.
pip install biplist pycryptodome & :: Optional, since the pip will install these dependencies automatically.
pip install git+https://github.com/KnugiHK/iphone_backup_decrypt
Simply invoke the following command from shell, remember to replace the username and device id correspondingly in the command.
wtsexporter -i -b "C:\Users\[Username]\AppData\Roaming\Apple Computer\MobileSync\Backup\[device id]"
After extracting, you will get these:
Invoke the wtsexporter with --help option will show you all options available.
> wtsexporter --help
Usage: wtsexporter [options]
Options:
--version show program's version number and exit
-h, --help show this help message and exit
-a, --android Define the target as Android
-i, --iphone Define the target as iPhone
-w WA, --wa=WA Path to contact database
-m MEDIA, --media=MEDIA
Path to WhatsApp media folder
-b BACKUP, --backup=BACKUP
Path to iPhone/Android (must be used together with -k)
WhatsApp backup
-o OUTPUT, --output=OUTPUT
Output to specific directory
-j, --json Save the result to a single JSON file
-d DB, --db=DB Path to database file
-k KEY, --key=KEY Path to key file
- Convert
\r\n
to<br>
- Reply in iPhone
- The CSS for metadata (e.g. {Message Deleted})
This is a MIT licensed project.
The Telegram Desktop's export is the reference for whatsapp.html in this repo