How to Export iMessage Conversations for Court Evidence
Reviewed by Jacob Reed, founder of Verity · ·

Short answer
Apple's Messages app has no export button. The complete record is a database file called chat.db. On a Mac it is at ~/Library/Messages/chat.db; for an iPhone it sits inside a backup made to a computer and has to be pulled out with a backup tool. Copy the file and leave the original untouched.
Watch the walkthrough
The same steps, narrated, in under two minutes.
Plays from YouTube when you press play. Subscribe on YouTube for the walkthroughs of other apps.
WhatsApp and Telegram both have a button that says "export chat." Apple's Messages app doesn't. Getting a real, complete iMessage record means going after the file the app actually stores everything in — chat.db — which sounds more technical than it needs to be. Here's the realistic path to it.
Already have chat.db and only need to open it? See how to read a chat.db file.
What is chat.db?
chat.db (sometimes named sms.db, depending on iOS version) is a SQLite database — a small, self-contained file format used to store structured data — and it's where Apple's Messages app keeps every conversation: the message text, exact send timestamps, who sent it, and whether it was iMessage or SMS. On a Mac it normally lives at ~/Library/Messages/chat.db. On an iPhone, the same data exists on the device but isn't reachable directly — it only becomes accessible once the phone is backed up to a computer.
There's no Apple-provided "export this conversation" feature that hands you a clean text file the way WhatsApp or Telegram do. That's a real gap for anyone trying to preserve a conversation for a case, and it's the reason this deserves its own walkthrough rather than a single line in a general export guide.
How do you read a chat.db file?
Because chat.db is an ordinary SQLite database, any SQLite viewer can open it — DB Browser for SQLite is a free, open-source one. Work on a copy, never the original. Inside, the messages are rows in a table called message, the phone numbers and email addresses are in handle, and the conversations are in chat.
Two things make the raw file hard to read by eye. Dates are stored as a count of time since January 1, 2001 — in nanoseconds on current versions of macOS — so a timestamp looks like an eighteen-digit number until it's converted. And on recent versions of macOS, the text column is often empty, with the message body held instead in a binary column called attributedBody. A viewer shows those rows as blank even though the message is there. Verity converts the dates and reads both columns, so you don't have to do either by hand.
Phone lost or wiped? Your carrier keeps a log of texts, not their words (seewhat your carrier can give you). To avoid that next time, seehow to back up text messages online.
Where is chat.db on a Mac or an iPhone?
1.If the messages are already on a Mac
Press Command-Shift-G in Finder, type ~/Library/Messages, and press Return — chat.db is sitting right there. Copy it to a new folder together with chat.db-wal and chat.db-shm if they are there: the newest messages can still be in chat.db-wal. This only works if Messages in iCloud is turned on and synced, or if the conversation happened on that Mac directly. If the exchange only ever happened on an iPhone, this file won't have it and you'll need the backup route below.
2.From an iPhone backup (Mac or Windows)
Connect the iPhone to a computer and back it up locally — Finder on a current Mac, iTunes on Windows or an older Mac. That backup contains chat.db, but Apple buries it inside a folder of hashed, unlabeled filenames that aren't practical to search by hand. A backup-extraction tool built for this — iMazing is the one most people land on, available for both Mac and Windows — reads the backup and lets you pull out the Messages database (or export the conversation to PDF/text) without digging through raw backup files yourself. If the backup is password-protected, the tool will ask for that backup password before it can read anything.
3.Upload the file as-is
Don't open chat.db in another app, convert it, or retype anything out of it first — upload the file exactly as extracted (with chat.db-wal, if you copied one). Verity reads the .db directly in your browser and pulls out the message text, real timestamps, and who sent what.
No Mac? See how to export iPhone messages on Windows for where the file sits in a Windows backup.
Why is chat.db better than a screenshot?
A screenshot shows whatever fits on one screen, in whatever order someone chose to capture it, and it's trivial to crop or stage. chat.db has none of that ambiguity — every message carries the timestamp Apple's own database stored at the moment it was sent or received, in full conversation order, with no manual step where content could be altered. Verity also separates real message text from tapbacks ("Loved an image") and system events (name changes, members added), rather than guessing at what a garbled row might have said — anything it can't confidently read is counted as skipped, not silently invented.
Is the conversation uploaded anywhere?
chat.db can run into the hundreds of megabytes for a long-running account, and it never gets uploaded anywhere to make this work. Verity reads the file entirely inside your browser using sql.js, a version of SQLite compiled to run client-side, so the parsing happens on your own machine. If you're using the free consumer flow, only the resulting parsed messages — the much smaller output — are held temporarily in your browser's session storage to hand off to the analysis page; the raw .db file itself is never transmitted anywhere. The same client-side approach is used in Verity's attorney portal.
This is general information, not legal advice. Verity is not a law firm, and requirements for authenticating a digital record vary by court — talk to an attorney about what your case specifically needs.
Already have a chat.db file?
Upload it and get a free health score in minutes — parsing happens in your browser, and the raw file never leaves your device.
Analyze your export →