It’s easy to convert your WhatsApp database to plain text so you can view chat history outside of the app. WhatsApp stores all your messages in a SQLite database file on your phone. By extracting this database and converting it, you can access your chats through a text file.
Why Convert WhatsApp Database to Text?
There are a few reasons you may want to convert your WhatsApp data to text:
- View chat history – The text file allows you to read through all your conversations outside of the WhatsApp app.
- Search chats – You can search for keywords and phrases easily in a text document.
- Backup chats – Converting to text gives you a simple backup of your chats that can be easily stored and shared.
- Data analysis – Analyzing chat data is easier when it’s in a text format.
- Legal purposes – Text exports can be useful for providing conversations as legal evidence.
Locating WhatsApp Database
The WhatsApp database file is stored in the following locations depending on your device:
iPhone
- /User/Library/Databases/ChatStorage.sqlite
Android
- /data/data/com.whatsapp/databases/msgstore.db
Windows Phone
- /Users/[user]/AppData/Local/Packages/WhatsApp/LocalState/msgstore.db
On Android you’ll need root access to directly access the database file. On non-rooted devices you can use a backup extractor.
Extracting WhatsApp Database
Once you’ve located the database file, you need to extract it from your phone:
iPhone
- Make an iTunes backup of your device.
- Use a sqlite browser to open the Chatstorage.sqlite file from the backup.
- Save the file to your computer.
Rooted Android
- Use a file explorer or terminal to copy the msgstore.db file to your computer.
Non-rooted Android
- Use a backup tool like Google Drive or WhatsApp’s built-in backup to backup chats.
- Extract the database file from the backup using an extractor tool.
- Save the extracted file to your computer.
Windows Phone
- Enable WhatsApp backups in phone settings.
- Connect phone to computer and browse to the AppData/Local/Packages/WhatsApp folder.
- Copy the msgstore.db file to your computer.
Converting Database to Text
Once you’ve extracted the database file, you need to convert it to text. There are a few options for this:
Use Online Converters
Several free online tools allow you to upload your WhatsApp database and convert it to text:
- BackupTrans WhatsApp to Text Converter
- iMessageOnline WhatsApp to Text Converter
- Jihosoft WhatsApp Exporter
These tools are quick and easy but may have file size limits.
Use Desktop Apps
Several desktop apps can convert WhatsApp databases to text:
- iOS: iExplorer, iBackupBot, iBackup Viewer
- Android: SQLite Database Browser
- Windows: WhatsApp Viewer
These give you more control over the conversion but require installing software.
Scripting
For advanced users, scripts can be written in programming languages like Python to parse the SQLite database and output as text. This gives the most flexibility but requires coding knowledge.
Exporting Chat History to Text
Once converted to text, your chat history will be output into a text file. Here’s an example snippet:
[5/10/20] [5:02 PM] John Doe: Hey how's it going? [5/10/20] [5:05 PM] Jane Smith: Good! Just grabbing some dinner. [5/10/20] [5:07 PM] John Doe: Nice what are you having? [5/10/20] [5:08 PM] Jane Smith: Just a salad. Had a big lunch today. [5/10/20] [5:10 PM] John Doe: Cool I had a big sandwich for lunch lol
Dates, times and names will be converted along with the message text to give context. Media files like images won’t be included.
How to Search Converted WhatsApp Text File
Once your chat history is extracted, you can open the text file on any computer to view and search your WhatsApp conversations. Here are some tips:
- Open the .txt file in a text editor or word processor like Notepad or Word.
- Press Ctrl + F on Windows or Command + F on Mac to open search.
- Enter keywords or phrases to search for in your chat history.
- Use quotes around phrases to search for exact matches.
- Try broad keywords as well as specific phrases.
- Look through context around results to understand the full conversation.
Having your chats in a searchable text file makes it easy to find specific messages, conversations, quotes and more!
Pros and Cons of Converting to Text
Pros | Cons |
---|---|
|
|
Alternative Ways to Export Chats
Here are some other options for exporting your WhatsApp chats:
- Email chat – On Android and iOS you can email full chat history or selected chats to yourself or others.
- PDF export – Use a third party app to export chats as a PDF document.
- Cloud backup – Back up to Google Drive or iCloud then export from the cloud storage.
- Native backup – Use WhatsApp’s built-in chat backup and restore to transfer chats to a new device.
These alternatives retain more formatting compared to converting to text.
Conclusion
Converting your WhatsApp database to a text file allows easy access, searching, sharing and analysis of your chat history. While the text format has some limitations, the steps to extract the database and convert to text are straightforward on both iPhone and Android. With a bit of effort it provides a lightweight backup that can give you insights into your conversations.