Shubham Dixit, email forensics and data file expert

Written by Jennifer Walsh. Reviewed for technical accuracy by Shubham Dixit, Independent Expert in Email Forensics and Data File Conversion.

Shubham is an independent external reviewer and not an employee of PCDOTS.

Quick answer. A MSG file is Outlook’s own binary format, not plain text, so you need something that can read it. The free Python extract-msg library does exactly that, so a short script turns a folder of MSG files into a spreadsheet, one row per email, that opens straight in Excel or saves as CSV. A tool does the same without any code.

MSG is binary, so it needs a parser

One fact shapes this whole job. A MSG file is Outlook’s own format for a single email, and unlike a plain-text message it is a binary file, built on the Microsoft OLE compound-file structure. So you cannot just open it in a text editor and read the fields, and you cannot grep it. To turn a folder of MSG files into an Excel spreadsheet, one row per email with columns like Subject, From, To and Date, you need something that can parse that binary and pull the fields out. The good news is that a free, well-known tool does exactly that, so you do not need Outlook or a paid app for the common case.

D0 CF 11 E0A1 B1 1A E1.msg, binary parserreads the fields SubjectFromDateInvoiceAnaMar 3Re: TripSamMar 4

A parser turns the binary MSG into readable spreadsheet columns.

“The mistake I see most often is people treating a MSG like a text file, or trusting Outlook’s export to make a spreadsheet of their mail. Neither works. MSG is a binary OLE container, and Outlook’s comma separated export only ever handled contacts, not messages, so a mail folder run through that wizard does not give you the table you wanted. The clean, free answer is the extract-msg library in Python, it opens the binary properly and hands you the subject, sender and date, and from there a few lines write a CSV or an Excel file. For a big batch without any code, a dedicated converter is the sensible pick.” Shubham Dixit, Email Forensics reviewer (draft, pending approval)

The free way, a short Python script

Python is free and, with one small library, reads MSG cleanly, so this is the honest no-cost route. Install the extract-msg library with pip install extract-msg, and it does the hard part of parsing the binary for you. In your script, for each file you run msg = extract_msg.Message(path), then read msg.subject, msg.sender, msg.to and msg.date, then write those to a row. A loop over a folder handles hundreds of MSG files in one pass, and you pick exactly which fields become columns. It is a short, reusable script, and it needs no Outlook and no purchase.

CSV or a real Excel file

Now the small choice between CSV and a true Excel file, because people search for both and they are the same job. The simplest output is a CSV, written with Python’s built in csv module, which double-clicks straight into Excel as rows and columns. If you want a real .xlsx, the modern Office Open XML workbook, with formatting, headers in bold or multiple sheets, write it with pandas or openpyxl instead, which takes only a couple more lines. Both open in Excel, Google Sheets and LibreOffice Calc, and once your emails are in rows you can sort, filter, build pivot tables or charts, which is exactly why teams do this for reporting, analysis or e-discovery and compliance records. Pick CSV for the quickest result or .xlsx when you want a polished workbook.

folder of .msgOutlook binary extract-msgread fields, write rows CSV or .xlsxone row per email Excel

The extract-msg library parses each MSG and writes the rows.

Two routes that look right but aren’t

Two popular tips lead people in circles, so it is worth naming them. The first says to drag your MSG files into an Outlook folder, then use File, Open & Export, Import/Export, then export to Comma Separated Values. It sounds right, but Outlook’s CSV export only handles contacts, calendar and tasks, not email messages, so a mail folder run through that wizard will not give you a tidy table of subjects, senders and dates, just an empty or useless file. The second says to use Excel’s Insert, Object, Create from File. That only embeds the .msg as an icon in a cell, a link back to the file, it does not read the fields into columns. On Windows, PowerShell can read MSG through the Outlook object model if Outlook is installed, but for a plain spreadsheet the Python script above is simpler and needs no Outlook. Online converters exist too, though uploading email data to a website carries a privacy cost for anything private.

look right, but don’t Outlook CSV exportonly exports contacts, not mail Excel Insert, Objectonly embeds an icon, no columns what actually works a MSG parser, extract-msg or a tool Subject From Date Invoice Ana Mar 3 Re: Trip Sam Mar 4

Two common tips are dead ends, a real parser gives you the table.

The no-code way, a tool

When you want it done in a window, in bulk, with attachments handled and no scripting, a converter earns its place. The PCDOTS MSG Converter reads a folder of MSG files on its own, no Outlook needed, lets you pick the fields to keep, Subject, From, To, Date, Cc and Bcc, filter by date, then exports them to a CSV you open in Excel, with attachments handled and duplicates removed. It runs on Windows with a free trial so you can preview the result before saving. For a one off table the free Python route is plenty, this is for volume and a no-fuss window. You can also view a MSG file for free first if you just want to read it.

1Run itOn Windows,open the menu 2Add MSGFiles or awhole folder 3ExportCSV, pickthe fields 4SaveOpen inExcel iStandalone, no Outlook, and the free Python route handles a one off.

The tool route, a folder of MSG files into one spreadsheet.

The tool follows four short steps.

Step 1. Install and run the software on Windows.

Run the MSG to Excel converter

Step 2. Add your MSG files or a whole folder.

Add the MSG files or folder

Step 3. Open Export and choose CSV, then pick the fields.

Choose CSV and the fields to export

Step 4. Pick a destination and save, then open it in Excel.

Save the CSV and open in Excel

Related reading, our guides to convert MSG files to CSV and convert EML files to CSV. To read a message first, the free MSG viewer opens a .msg without Outlook.

Free Download
Buy Now

The methods compared

All of these give you a spreadsheet, so pick by comfort and scale.

Method Best for Good to know
Python extract-msg Any number of files Free, no Outlook, CSV or .xlsx
Converter tool Bulk, fields, attachments Windows, standalone
Outlook CSV export Not for email messages Contacts only, avoid here

Frequently asked questions

How do I convert a MSG file to Excel for free?
Use a short Python script with the extract-msg library. It reads each .msg file’s fields and writes a row to a CSV, which opens straight in Excel, or to an .xlsx with pandas.

Can I convert MSG to Excel without Outlook?
Yes. The extract-msg script reads the binary MSG directly, and a desktop converter is standalone, so neither needs Outlook installed.

Why doesn’t Outlook’s CSV export give me an email table?
Because Outlook’s Import/Export to CSV is built for contacts, calendar and tasks, not email messages. A mail folder run through it will not produce the table you expect.

Is a CSV the same as an Excel file?
A CSV is plain text that Excel opens as a spreadsheet, which is enough for most needs. A true .xlsx keeps formatting and multiple sheets, and a script or tool can write either.

What columns can I get from a MSG file?
Any field you choose, commonly Subject, From, To, Date and Cc, plus the message body if you want it. You decide which become columns.

Will it convert a whole folder of MSG files at once?
Yes. A script loops the folder and a tool loads many files together, so bulk conversion to one spreadsheet is straightforward.

Keep the script for next time

The useful takeaway here is that a MSG file only looks locked. It is binary, yes, but the free extract-msg library opens it cleanly, so a short Python script turns any folder of them into a CSV or Excel table, with no Outlook and nothing to buy. Save that script somewhere handy, because the next time a batch of MSG files lands on your desk, you are one command away from a sorted, filterable spreadsheet. Reach for the converter when you want it in a window with attachments and fields handled, but keep the free route in your back pocket for whenever it comes up again.

Shubham Dixit

Reviewed by Shubham Dixit

Independent Expert in Email Forensics and Data File Conversion. Shubham reviewed this guide for technical accuracy. He is an independent external reviewer and not an employee of PCDOTS.

Profile  |  LinkedIn