MacOS – How to convert .ichat logs to text files

ichatmacosmessages

How do you convert the iChat transcript files that Messages creates into human-readable text files that can be opened without the Messages app?

For reference, these are the conversation files located in ~/Library/Messages/Archive.

Simply opening the .ichat files in a text editor includes a bunch of additional strings and hashes. Opening them in Messages and copy-pasting into a text editor works, but I'd prefer to automate the process if possible.

Best Answer

The files that Messages saves have an ichat file extension.

But from the command line you can inspect them to see they are actually binary plist files:

$ file transcript.ichat
transcript.ichat: Apple binary property list

Turns out, you can easily convert binary plist files into human-readable XML documents:

$ plutil -convert xml1 transcript.ichat

Now, when you run file again, you can see it's an XML file:

$ file transcript.ichat
transcript.ichat: XML document text

Go ahead—open it and see for yourself:

$ open transcript.ichat