The WhatsApp key file contains the encryption keys used to secure WhatsApp communication and media. It is an important file that must be backed up regularly to prevent losing access to WhatsApp data if you lose your phone or switch devices. But where exactly is this key file located? The location varies by platform.
Where is the WhatsApp key file on Android?
On Android devices, the WhatsApp key file is located in the WhatsApp/Databases folder. To find it:
- Open the File Manager app on your Android device.
- Navigate to the WhatsApp folder, usually located at: Internal Storage/WhatsApp/Databases.
- Look for a file named msgstore.db.crypt12.
- This is the WhatsApp key file that contains your encryption keys.
The exact path may vary across different Android versions and devices, but generally the WhatsApp folder is under Internal Storage, then the Databases subfolder contains the key file.
Some things to note on Android:
- You may need to have File Manager set to show hidden files to see the Databases folder.
- The file name may have a different number than 12 at the end if you updated WhatsApp.
- On newer Android 10+ devices, the WhatsApp folder may be in Media/WhatsApp instead of directly under Internal Storage.
But generally checking the Databases folder inside WhatsApp is the way to find the key file on Android phones and tablets.
Where is the WhatsApp key file on iPhone?
On iPhones, the WhatsApp key file is stored in the user’s iCloud Drive account. To locate it:
- Open the Files app on your iPhone.
- Tap Browse at the bottom.
- Tap iCloud Drive.
- Tap WhatsApp.
- Tap Databases.
- The msgstore.db.crypt12 file here contains your keys.
So unlike Android, WhatsApp keys are synced to iCloud Drive on iOS. The Databases folder still contains the actual key file though.
Some things to note on iPhone:
- You need to have iCloud Drive enabled to see the WhatsApp folder.
- Make sure Show Hidden Files is enabled in Files to see the Databases folder.
- The file may be named msgstore-YYYY-MM-DD.1.db.crypt12 with the date if you have chat history backups.
Checking iCloud Drive > WhatsApp > Databases will always lead you to the current WhatsApp key file on iOS devices.
Where is the WhatsApp key file on Windows Phone?
On Windows Phone devices, the WhatsApp key file is stored in the following location:
Internal Storage/Data/Users/DefApps/APPDATA/{BBM/WhatsApp}/Store/MsgStore.db
So to find it:
- Open File Explorer on your Windows Phone.
- Navigate to the Data folder.
- Go into Users > DefApps.
- Open the WhatsApp folder.
- Go to Store and look for MsgStore.db.
This MsgStore.db file contains the keys for encrypting your WhatsApp data on Windows Phone.
Some things to note:
- You may need to enable viewing hidden folders in File Explorer.
- The full folder path may vary slightly on some devices.
- Look in the BBM folder if using WhatsApp Plus instead.
But the Store folder inside WhatsApp will have the key file on most Windows Phones.
Where is the WhatsApp key file on desktop?
On desktop platforms like Windows, Mac and Linux, the WhatsApp key file location depends on the app data storage location for that OS.
Windows
On Windows PCs, it is typically located in:
C:\Users\[USERNAME]\AppData\Roaming\WhatsApp
Mac
On Macs, it is usually located in:
/Users/[USERNAME]/Library/Application Support/WhatsApp
Linux
On Linux, if using the Snap package, it is in:
/home/[USERNAME]/snap/whatsapp/current/.config/WhatsApp
Or if using the standalone Linux app, check:
/home/[USERNAME]/.config/WhatsApp
The key file itself is named msgstore.db.crypt12 as on mobile inside the WhatsApp folder for desktop apps.
How to backup and restore the WhatsApp key file
Now that you know the location, here are some tips for backing up and restoring your WhatsApp keys:
- Copy the msgstore.db.crypt12 file to safe storage regularly.
- Save it to an external SD card, USB drive, cloud storage, or another device.
- When switching phones, install WhatsApp and restore the key file to retain encryption.
- On iPhone, enable encrypted iCloud Drive backups to sync the key file.
- On Android, use built-in backup tools or apps like Google Drive to backup the Databases folder.
- If keys are lost, you may have to verify identity to restore chats if no backup exists.
Keeping your WhatsApp key file safely backed up is crucial to avoiding permanent data loss when moving between devices or reinstalling the app. Follow the steps above for your specific platform to know exactly where to access the file for backup or restore purposes.
Why is the key file important?
The WhatsApp key file deserves special attention because:
- It contains the keys used to encrypt your messages, media, and calls.
- Without it, your WhatsApp data is inaccessible if you lose your phone.
- It ensures messages remain end-to-end encrypted when restoring WhatsApp.
- Backing it up provides a safeguard against losing encryption keys and data.
- Restoring it retains access to your chat history when switching phones.
So this small database file plays an outsized role in securing your WhatsApp account and messages. Treat it as sensitive data and keep regular backups of the key file for peace of mind.
Conclusion
- The WhatsApp key file is named msgstore.db.crypt12 in the Databases folder.
- On Android it’s in Internal Storage/WhatsApp/Databases.
- On iPhone it’s in iCloud Drive/WhatsApp/Databases.
- On Windows Phone it’s in Data/Users/DefApps/WhatsApp/Store.
- On desktop it’s in the app data or home folder for WhatsApp.
- Back up this file regularly to safeguard your encrypted WhatsApp data.
Now you know exactly how to locate the critical WhatsApp key file used to encrypt your account information and chat messages. Follow the guide for your specific device platform and take steps to keep automatic backups of this important file. With proper care, you can ensure seamless and secure continuity of your encrypted WhatsApp data when switching phones or reinstalling the app.
Frequently Asked Questions
Why is my key file named differently?
The key file name may vary if you have updated WhatsApp, restored chats from a backup, or have multiple chat backups stored. But it will always be named msgstore.db.crypt12 or similarly with a date or number appended. The location remains the same.
Can I restore WhatsApp without the key file?
You can reinstall WhatsApp without the key file but will lose access to your previous chats and message history. Your account still exists but the messages cannot be decrypted without the proper key file.
Is the key file the same as my chat backup?
No, the key file contains your private encryption keys while the chat backup is a separate archive of your actual WhatsApp chat history in encrypted format. Both are needed to fully restore your account.
Do I need to backup the key file separately?
If your normal backup process (iCloud, Google Drive) includes the Databases folder with the key file, then no separate backup is needed. But it’s a good idea to occasionally copy it separately as an extra precaution.
Can I backup the key file to the cloud?
Yes, you can upload the msgstore.db.crypt12 file to cloud storage like Google Drive, Dropbox, OneDrive etc. Just be sure to use strong encryption like a password or encryption utility to protect the key data.
Platform | Location |
---|---|
Android | Internal Storage/WhatsApp/Databases |
iPhone | iCloud Drive/WhatsApp/Databases |
Windows Phone | Data/Users/DefApps/WhatsApp/Store |
Desktop (Windows) | C:\Users\[USER]\AppData\Roaming\WhatsApp |
Desktop (Mac) | /Users/[USER]/Library/Application Support/WhatsApp |
Desktop (Linux) | /home/[USER]/.config/WhatsApp |
What happens if I delete the key file?
Deleting the key file will result in permanent loss of access to your encrypted WhatsApp data and chat history. Your account still exists but the messages cannot be decrypted without the proper keys. So avoid deleting this important file.
Can I transfer the key file from one phone to another?
Yes, you can copy the msgstore.db.crypt12 file from your old phone and transfer it to your new phone via file manager, SD card, cloud storage etc. It will allow you to migrate your chats to the new device.
Is the key file encrypted or secured?
The key file itself is not encrypted, but it contains the keys needed to decrypt your encrypted WhatsApp database. So it should still be treated as sensitive data and protected via phone encryption, backup encryption, or storage encryption.
Where is the key file in WhatsApp Business?
The WhatsApp Business key file is stored in the same Databases folder location as regular WhatsApp – in Internal Storage on Android, iCloud Drive on iOS, and app data folders on desktop. The file name is msgstore-business.db.crypt12 instead of msgstore.db.crypt12.
Can I view or open the key file contents?
No, the msgstore.db.crypt12 file is a database that contains encrypted key data. It cannot be viewed directly or edited. The WhatsApp app accesses it to encrypt your chats. For users, it only needs to be backed up and restored to new devices when needed.