Convert an Outlook PST to JSON

January 6, 2020 by Steven Ng

I had to archive an Outlook mailbox to a PST file recently, but I'm not a huge fan of using Outlook for finding e-mails.

I looked around for tools that would convert a PST to JSON so I could load my data into something like Postgresql, but I didn't find anything that was free (I only need to do the conversion once).

I ended up searching for an NPM that could extract objects from a PST, and found epfromer's pst-extractor..

Using that NPM, I made a simple command line tool for Windows that can extract a PST into a JSON file.

Since my requirements were modest (one time use, reasonably sized PST file), I didn't really design it to scale. It doesn't support password protected PSTs, and I can't guarantee that it will run on a giant PST file if your machine doesn't have enough memory, but it's there if you need the functionality.

To use it, just download the executable from Github.

The command structure is pretty straightforward. From the directory of the executable, use:

pst_to_json -s /path/to/file.pst -d /path/to/output.json

There are some additional switches, but the above command is all you need to accomplish the task.