What is chat.db on a Mac?
chat.db is the file in the Messages folder of your Mac's Library where the Messages app keeps your conversations. TextExhibit reads it, with your permission, when you choose Messages on this Mac as the source.
What it means in plain words
It is a database with tables for messages, chats, handles (phone numbers and emails) and attachments. Times are stored in a special format.
Do not open it in other apps, move or edit it. Changing it can damage your Messages history.
How it applies to text messages
macOS protects the file. The app needs Full Disk Access to read it. See Full Disk Access for Messages.
It holds the messages synced to the Mac. If Messages in iCloud is off, it may hold only what the Mac received.
An example
A user enables Full Disk Access for the app in System Settings, Privacy and Security. The app then lists conversations from chat.db.
When you might care about this file
Most people never need to know chat.db exists. It matters if Messages on the Mac shows less than expected, if you are trying to understand why an export differs from what the phone shows, or if an IT person asks where messages are kept.
If you back up your Mac with Time Machine, this file is included. Do not restore only this file into a live system without advice, because that can corrupt the Messages history.
If Messages on the Mac looks incomplete
The Mac may hold only part of your history if Messages in iCloud has not finished syncing or was never on. Check the oldest message you expect to see. If it is missing, use the iPhone over a cable or a Finder backup as the source instead, and compare the message counts.
What to keep in mind
- Do not edit the file.
- It may not hold everything on your iPhone.
- This is general information, not legal advice.
Questions
Where is it?
In your Library folder under Messages.
Can I copy it?
You can, but do not alter the original.
Is it the same as sms.db?
That is the iPhone version.
Export the whole conversation
TextExhibit turns a conversation into one PDF with exact times, names and numbers, photos in place and page numbers, on your Mac. Free to preview; $24.99 once to export.