Shubham Dixit, email data and file conversion 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. An EML file is a single email in plain text, so its From, To, Subject and Date sit in readable headers. Converting EML to CSV means one row per email with those as columns, and because it is plain text a short Python script does it free. The same script writes a TSV, and a tool handles it without any code.

One row per email

Quick framing first, because it makes the whole job clear. An EML file is a single email saved on its own, and it is plain text inside, in the standard MIME layout, with the From, To, Subject and Date sitting at the top as readable headers. EML is the single-message format behind Outlook, Thunderbird, Apple Mail and Windows Mail. Apple Mail’s near-identical .emlx files work the same way. A CSV is a spreadsheet. So converting a folder of EML files to CSV really means turning each email into one row, with those header fields as the columns, so you can sort and read them in Excel or Google Sheets. Because the fields are already plain text, you do not need special software to do it. A dedicated tool is handy for volume or if you would rather not script, but the free route below covers most needs.

folder of .eml email-1.eml email-2.eml email-3.eml one row each SubjectFromDate InvoiceAnaMar 3 Re: TripSamMar 4 CSV, one row per email

Each EML file becomes a single row of columns.

“The thing to hold onto is that an EML file is not locked away. It is plain text, and the fields you want in a spreadsheet, subject, sender, date, are right there in the headers. So a dozen lines of Python will walk a folder and write a row for each message, and there is nothing to buy. If your data has commas in it, write a TSV instead by switching the separator to a tab, same script. A dedicated converter is worth it when you want it without code, or you also need attachments and a lot of fields, but for a straightforward table the free route is the honest first stop.” Shubham Dixit, Data File Conversion reviewer (draft, pending approval)

The free way, a short Python script

Python is free on any system and reads EML natively, so this is the cleanest no-cost route. Its built in email module opens each .eml file and hands you the headers by name, and the csv module writes the rows. In plain terms, you point the script at your folder, and for every file it reads msg['subject'], msg['from'], msg['to'] and msg['date'], then writes one line to the CSV. A loop over the folder handles hundreds of files in one go, and you choose exactly which fields become columns. It is a short script you can reuse whenever a pile of EML files needs to become a table. On Windows, PowerShell can do the same job, though its email parsing is fiddlier than Python’s built in module.

Want a TSV instead?

Plenty of people actually want a TSV, tab separated rather than comma separated, and it is the same job. If a subject line itself contains a comma, the csv module simply wraps that field in quotes, so a plain CSV stays correct on its own, but many people still prefer a tab separator to skip the quoting. In the Python script above, you get a TSV by telling the writer to use a tab, csv.writer(f, delimiter='\t'), and nothing else changes. One more tip, if you open the file where Excel expects a semicolon, as it does in some regions, save it with a semicolon delimiter so the columns line up. Both CSV and TSV open straight into Excel or Google Sheets.

folder of .emlplain text Python email + csvread headers, write rows CSV or TSVone row per email Excel

A short script reads the headers and writes a row for each email.

No code, free, via Thunderbird

Rather not touch a script but still want it free? Thunderbird with the free ImportExportTools NG add-on does it through menus. Install the add-on, then import your folder of EML files into a Thunderbird folder, it can take a whole directory at once. Now right-click that folder, open ImportExportTools NG and choose to export the messages, or just the index, as CSV. You get a spreadsheet of the subjects, senders and dates without writing a line of code. It is a little more clicking than a script, but it is genuinely free and stays on your computer.

What about copy and paste?

You may have tried the by-hand route, open a .eml, copy the subject, sender and date, then paste them into a spreadsheet row. It works for one or two messages, but it does not scale. You open each file one at a time, the attachments and most headers are left behind, and a stray comma in a pasted subject can push your columns out of line. That last snag is the whole reason the script route is cleaner, the csv module wraps awkward fields in quotes for you, or a tab separated file sidesteps commas entirely, so a folder of hundreds of emails lands in tidy columns with no manual fixing.

a subject with a comma: Re: lunch, drinks naive paste Re: lunch drinks split into two columns csv module, or a tab “Re: lunch, drinks” Ana stays in one cell

A script keeps a comma-laden subject in one cell, a hand paste splits it.

The no-fuss way, a tool

When you want it done in a window, with more fields, attachments or a lot of files at once, a converter earns its place. The PCDOTS EML Converter loads a folder of EML files, including Apple Mail .emlx, lets you pick the header fields to keep, from Subject, From, To, Date, Cc and Bcc through to the message body itself, filter by date, then writes them to a single CSV or TSV, with attachments handled and duplicates removed. It runs on current Windows with a free trial so you can preview the output before saving. For a one off table the free Python or Thunderbird route is plenty, this is for volume and a no-fuss window. If your finished CSV still has repeats, our CSV Duplicate Remover clears them.

1Run itOn Windows,open the menu 2Add EMLFiles or awhole folder 3ExportCSV or TSV,pick fields 4SaveOpen inExcel iFor a one off table, the free Python or Thunderbird route above is plenty.

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

The tool follows four short steps.

Step 1. Install and run the software on Windows.

Run the EML to CSV converter

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

Add the EML files or folder

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

Choose CSV or TSV and the fields

Step 4. Pick a destination and save.

Save the CSV output

Related reading, our guides to convert a PST file to CSV and extract email addresses from an MBOX file. To open a message first, the free EML viewer reads a .eml without any client.

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 script Any number of files Free, CSV or TSV, reusable
Thunderbird add-on No code, still free Import, then export index CSV
Converter tool Bulk, fields, attachments Windows, CSV or TSV

Frequently asked questions

How do I convert EML files to CSV for free?
Use a short Python script. Its email module reads each .eml file’s headers and the csv module writes one row per email, so a folder of emails becomes a spreadsheet at no cost.

Can I convert EML to TSV as well?
Yes. It is the same script, you just set the writer’s delimiter to a tab. A TSV is handy when subjects or other fields contain commas.

Is there a way without writing code?
Yes. Import the EML files into Thunderbird with the free ImportExportTools NG add-on, then export the folder’s messages or index as CSV. A desktop converter also does it in a window.

What columns can I get in the CSV?
Any header field you choose, commonly Subject, From, To, Date and Cc. A script or tool lets you decide which fields become columns.

Can Outlook export EML to a CSV of emails?
Not as a message table. Outlook’s built-in CSV export covers contacts, not email messages, so a script or a dedicated converter is the practical route.

Will it handle a whole folder of EML files at once?
Yes. A script loops the folder, Thunderbird imports a directory and a tool loads many files together, so bulk conversion is straightforward.

The one thing to remember

If only one point sticks, let it be that an EML file is plain text, not a locked format. The subject, sender and date you want in a spreadsheet are already sitting in the headers, so a short Python script can turn a whole folder into a CSV, or a TSV with a one word change, for free. Reach for Thunderbird if you would rather click than code, or the converter when you want fields and attachments handled in a window. But the format is on your side here, so the free route is a real first choice, not a compromise.

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