How to export and save your iMessage history (from your Mac)
Unlike WhatsApp, iMessage has no "Export chat" button. Your entire history — every blue and green bubble, every group thread going back years — sits inside the Messages app, and Apple gives you no tidy way to get it out. The good news: on a Mac, all of it lives in a single file you can copy. Here's where that file is, how to get it out safely, and what it takes to turn it into something you can actually read.
Why iMessage history is harder to hold onto than it looks
Your messages feel permanent because they're always right there when you open the app. But that history is locked inside Messages — there's no menu that hands you a transcript, and the usual advice ("just turn on Messages in iCloud") solves a different problem than the one you have:
- Messages in iCloud is sync, not archive. It keeps the same conversations mirrored across your iPhone, iPad and Mac, and frees up space on each. What it does not give you is a readable, portable copy you control — you can't open an iCloud "file" of your chats, and if you delete a thread it disappears everywhere at once.
- Your device is the archive, and devices don't last forever. Turn off a Mac for the last time, lose a phone, or start fresh on new hardware, and the history can go with it. Nothing outside Apple's walled garden has a copy unless you made one.
So the goal isn't to sync more carefully — it's to pull a real copy of the history out to a file that's yours, independent of any account.
Where iMessage actually lives
On a Mac, the Messages app stores everything in a database called chat.db, here:
~/Library/Messages/chat.db— the main database (every conversation and message).- Alongside it you'll usually see
chat.db-wal, a write-ahead log holding the most recent messages that haven't been folded into the main file yet. Grab it too if it's there.
iPhone-only? You still need a Mac in the loop, because iMessage doesn't
expose this file on iOS. The reliable route is to sign that Mac into the same Apple ID,
turn on Messages in iCloud (Messages → Settings → iMessage), and wait for your
history to finish downloading into the Mac's copy. Once the conversations show up in Messages
on the Mac, they're in that Mac's chat.db — and now you can copy it.
Getting chat.db out safely
The ~/Library folder is hidden by default, so you reach it by name rather than
by clicking around:
- In Finder, open Go → Go to Folder… (or press
⇧⌘G). - Type
~/Library/Messagesand press Return. The hidden folder opens. - Find
chat.db(andchat.db-walif present). - Copy them — don't move them — to another folder, a USB drive, or wherever you'll keep your archive. Leave the originals exactly where they are so Messages keeps working.
Copy in Finder, not Terminal. Reading these files from
Terminal trips over macOS's Full Disk Access protection and needs extra permissions. A plain
Finder copy sidesteps all of that. And chat.db is a single
SQLite file — copy it and you've copied every conversation in one go.
What you've actually got (and why you can't just open it)
Here's the catch: chat.db is a database, not a document. Double-click it and
nothing readable happens. Inside, it's built for the app, not for you:
- Timestamps are in Apple's own clock. Message times are stored as nanoseconds since 1 January 2001 — not the usual epoch — so raw values look like meaningless huge numbers until they're converted.
- The message text often isn't in the obvious place. On newer macOS,
Apple moved the actual words out of the plain
textfield and into a binaryattributedBodyblob (to carry formatting, links and mentions). Open the database naïvely and many rows look empty. - Everything is tangled together — messages, handles, chats and attachments live in separate tables you have to join to reconstruct a single conversation in order.
None of this is impossible, but it's why "just export my iMessages" turns into a small programming project. You've secured the raw material; now it has to become a record you can read.
This is exactly what ChatAttic automates
Point it at the chat.db you copied off your Mac and ChatAttic opens it
read-only, converts Apple's 2001-based timestamps back to real dates, recovers
the message text — including the words buried in the attributedBody blob —
attributes each message to you or the other person, groups everything by conversation, and
de-duplicates, writing one clean per-conversation archive you actually own. It also reads
WhatsApp, Telegram, Facebook/Instagram Messenger and Android SMS/MMS, so all your threads land
together in one place. In internal testing; sign up before launch for 25% off.
One honest note on platforms. ChatAttic runs on
Windows today, with a Mac version to follow. So the flow is: copy chat.db off the
Mac (exactly as above), then point ChatAttic at that copy on your PC. Nothing is uploaded
anywhere — the file stays on your own computer, and ChatAttic only ever opens it read-only, so
your original history is never touched.