macOS

Where Does Apple Messages Store Chats on Mac?

Where Apple Messages keeps its chat.db and attachments on Mac, permissions needed for access, and backup tips.

Last updated

Apple Messages on Mac keeps everything in one Library folder: the chat.db SQLite database with sidecar journals plus an Attachments tree. Every text, image, and receipt lands there automatically. The folder hides behind TCC protection that demands Full Disk Access.

Backups copy the database trio plus attachments with Messages quit. SQLite queries export conversations to CSV for archiving or printing. Work on copies; the live file locks and corrupts under careless hands. Export regularly for archives that outlive devices.

Where Apple Messages stores this, by platform

macOS
~/Library/Messages/chat.db

SQLite database with wal and shm sidecars plus the Attachments tree beside it. Needs Full Disk Access for any reader including Terminal. Copy with Messages quit; query copies with sqlite3 for exports.

Frequently asked questions

how do I back up iMessages on Mac

Quit Messages, then copy chat.db with its wal and shm sidecars plus the Attachments folder to external storage. Work on copies, never the live database. Time Machine captures the same tree automatically when enabled.

permission denied reading chat.db

Grant the terminal or browser Full Disk Access in Privacy settings, then relaunch it. macOS TCC blocks the Messages folder otherwise. Copy the database out before querying to dodge lock errors.

how do I export chats to CSV

Query a copy with sqlite3 against the message, handle, and chat tables joined appropriately. Community guides publish the standard joins for CSV export. Timestamps need the Apple epoch conversion to read sanely.

Notice an outdated path? Let us know.