macOS

Where Is the iMessage chat.db Database?

The Messages database sits at ~/Library/Messages/chat.db on every Mac. How to open it, why it stays locked, and where attachments live.

Last updated

Every message you have sent or received on a Mac is collected in one SQLite file called chat.db. Apple keeps it in a hidden Library folder, so Finder will not offer it to you without the exact path. The file has lived in the same place for years, through many macOS releases.

Two details matter before you touch it. Messages holds the file open while it runs, and macOS blocks most other apps from reading it unless you grant Full Disk Access. Quit Messages first and work on a copy, because the copy opens anywhere and the original will not.

Where iMessage stores this, by platform

macOS
~/Library/Messages/chat.db

Library is hidden, so in Finder press Cmd+Shift+G, paste the path and press Return. This is still the location on recent macOS releases, including macOS 26. Quit Messages before copying, since it keeps chat.db and its -wal sidecar busy while running, and any tool that opens the original needs Full Disk Access in System Settings > Privacy & Security. Photos, videos and files live in ~/Library/Messages/Attachments.

Frequently asked questions

where is the imessage database on my mac

At ~/Library/Messages/chat.db. The Library folder is hidden, so press Cmd+Shift+G in Finder, paste that path and press Return. Reading the original also needs Full Disk Access in System Settings > Privacy & Security.

why is chat.db locked or permission denied

Messages holds the database open while it runs, and macOS blocks other apps from reading it without Full Disk Access. Quit Messages, then either grant the permission or copy chat.db somewhere like the Desktop and open the copy instead.

does copying chat.db copy my photos and videos too

No. chat.db stores the message rows and pointers to files, not the media itself. Photos and videos sit in ~/Library/Messages/Attachments inside hashed subfolders, so copy that folder as well if you want them.

Notice an outdated path? Let us know.