A Simple, Fee-free Way to Export Texting Threads From Your iPhone
How I use my Mac's Terminal and imessage-exporter to archive texting threads from my iPhone
We don’t have unlimited storage on our iCloud account (few do!) so we archive our important texting threads every quarter. You can do this from the Messages app on a Mac by choosing Print from the File menu, but the result is a PDF that can be quite large. I wondered if there was a way to generate a simple CSV file of a texting thread.
Using your Mac, the imessage-exporter package can export iMessage data to txt or html formats. It can also run diagnostics to find problems with the iMessage database. I’ll walk you through how I used it to export to a text file and convert to a CSV.
I used Homebrew to install the package on my Mac, but the page lists several other options for doing so. Don’t be overwhelmed by this part – if you run into problems or have error messages crop up, ask ChatGPT for help. It can usually help you with prompts to get you back on track.
Type this line into the Terminal app on your Mac:
brew install imessage-exporterOnce that’s successful, you can type imessage-exporter and get a list of parameters that are valid.
Here’s how I use it, and I’ll describe the parameters:
-f txt – the file format should be text
-o ~/Downloads/MessageExport – files will be put in this folder
-m “Scott Dawson” – your name, to be used in the exports
-s 2026-03-04 – the start date (end date will be today)
imessage-exporter -f txt -o ~/Downloads/MessageExport -m "Scott Dawson" -s 2026-03-04That’s it! It’ll go really quickly. You’ll see a series of text files in the folder, and you can choose the ones you want to use for the next step. The script also contains a way to filter message threads by participant, so if you’re only looking for specific threads and not your whole database, that’s possible too.
The last step is one for AI, but I’m sure there’s a way to script this if you’re wary of putting your texting threads into Claude. Here’s the prompt that gives me the CSV format for a zip file I upload to Claude:
Please convert these text file(s) into a CSV file with columns for Date/Time, Sender, and Message. Each group of text represents a text message, where the first line is the date/time, the second is the sender, and the third is the message. Ignore any lines starting with “Tapbacks” and “Liked by” or “Loved by” or anything “by” and then a name/s. The file should be sorted ascending by date/time, so most recent should be last.


