How to Extract Email Addresses from EML Files
Summary: You can extract email addresses from EML files using three methods. Run a PowerShell regex script to scan plain-text EML files for email patterns. Import EML files into Thunderbird and use the address book collector. Use a dedicated EML email address extractor to process large folders and export a deduplicated CSV.
EML files store email messages in plain text format using the MIME standard. Each file contains headers, body, and attachments. Because the format is text-based, you can extract email addresses with a regex script, an email client like Thunderbird, or a dedicated extractor tool.
Why Extracting Addresses from EML Files Is Tricky
EML is the standard format for single-message email files. Most clients export individual messages as EML.
However, an EML file mixes headers, MIME parts, attachments, and inline HTML. As a result, you cannot just open one file and copy a clean address list.
The job gets harder with thousands of EML files. For example, a Thunderbird export can produce one EML per message. Therefore, you need a method that scans the whole folder and pulls only address fields into a clean list.
What You Need Before You Start
First, gather the basics. Then pick the method that matches your skill level.
- Your EML files in one folder (or several folders).
- PowerShell access on Windows, if you want Method 1.
- Thunderbird installed, if you want Method 2.
- A target CSV or TXT file location.
- A backup copy of the original EML folder.
Method 1: Run a PowerShell Regex Script on the EML Folder
PowerShell handles bulk EML files in seconds. It works because EML headers are plain text with predictable field names.
Why PowerShell works on EML
Each EML file starts with lines like From: name@example.com, To: ..., and Cc: .... A short regex pulls every address out of those lines.
Sample script and how to run it
First, open PowerShell in the folder that holds your EML files. Next, run:
Get-ChildItem -Filter *.eml -Recurse | Select-String -Pattern '[\w\.-]+@[\w\.-]+\.\w+' -AllMatches | ForEach-Object { $_.Matches.Value } | Sort-Object -Unique | Out-File emails.txt
Then open emails.txt to see the clean, deduplicated list. As a result, even ten thousand EML files finish in under a minute.
Why this works: The regex captures any string that looks like an email address. Therefore, it grabs From, To, Cc, Reply-To, and addresses inside message bodies in one pass.
Method 2: Import EML into Thunderbird and Collect Addresses
This route uses a free desktop client. It works well when you already use Thunderbird or want a visual preview before extraction.
Import the EML files into a local folder
First, install Thunderbird and create a local folder. Then install the ImportExportTools NG add-on.
Next, right-click the local folder and choose ImportExportTools NG > Import all eml files from a directory. Then point it at your EML folder.
Collect addresses from message headers
Once the messages load, select all of them. Then open Tools > Address Book and use Collect Addresses from the selected messages.
Finally, export the Collected Addresses book as CSV. As a result, you get a clean list with names paired to addresses.
Tip: Thunderbird only collects header addresses, not addresses inside message bodies. For body-level extraction, use Method 1 or Method 3.
Method 3: Use a Dedicated EML Email Address Extractor Tool
Sometimes the EML files contain mixed encodings, large attachments, or unusual MIME structures. In that case, a dedicated extractor is the safest path.
When to choose this method
Choose this route when you have many EML files with mixed content, when you need to filter specific fields (To, Cc, From, Body, Header), or when you want a single CSV with addresses from every part of the message. Additionally, it helps when EML files come from a server export with unusual line endings.
Steps
First, download the EML email address extractor on your PC. Then install and launch the tool.

Next, click the Open tab on the application screen.

Then go to Email Data Files and choose EML Files.

Next, browse to the EML folder. The tool loads every file and shows a preview on the left panel.

Then click the Extract tab and pick Email Addresses from the drop-down.

Next, choose the fields you want (To, Cc, From, Subject, Message Body, Message Header). For example, pick only From for a clean sender list.

Finally, browse to the destination folder and click Save. The tool writes a deduplicated CSV or TXT with every unique address.
Note: The tool also pulls addresses from message bodies and attachments. As a result, you capture every address that ever passed through the mailbox.
Which Method Should You Choose?
Use Method 1 (PowerShell) when you want a free, scriptable option and you trust regex. It also fits scheduled tasks.
Use Method 2 (Thunderbird) when you want a visual preview and need names paired to addresses. It works well for a few thousand files.
Use Method 3 (dedicated tool) when you have many files, mixed content, or need addresses from headers, bodies, and attachments in one CSV.
Common Errors and Fixes
Error: PowerShell script misses addresses in HTML-encoded body. EML files with HTML bodies encode addresses as HTML entities. Add a step to decode HTML entities before running the regex pattern match.
Error: Thunderbird fails to import .eml files directly. Thunderbird requires EML files to be placed in a mail folder directory, not imported via the UI. Copy the files to the profile mail folder and restart Thunderbird.
Error: Regex captures partial addresses or garbled text. This happens when the EML file uses base64 or quoted-printable encoding. Decode the body first using a MIME parser before applying the regex.
Error: Duplicate email addresses appear in the output. Multiple EML files often reference the same addresses. Run Sort-Object -Unique in PowerShell or use Remove Duplicates in Excel after export.
Frequently Asked Questions
Can I extract email addresses from EML files without any software?
Yes. A PowerShell one-liner works on any Windows PC. Therefore, no extra software is required.
Will the extracted list include duplicates?
No, if you use PowerShell with Sort-Object -Unique or a dedicated extractor. Both deduplicate automatically.
Can I pull addresses only from sent items or only from received mail?
Yes. Split the EML folder by sent and received before extraction. Alternatively, filter by From field at extraction time.
Are EML files modified during extraction?
No. All three methods are read-only. The original EML files stay untouched.
Can I get addresses from inside the message body too?
Yes. PowerShell regex and the dedicated tool both scan message bodies. Thunderbird’s address collector only reads headers.
How big an EML folder can I process?
Most methods handle hundreds of thousands of EML files. The main limit is free disk space for the output CSV.
Related Guides
- Extract Email Addresses from MSG Files: the sibling extractor for the MSG file format.
- Open MSG Files Without Outlook: useful when your EML batch also contains MSG attachments you want to inspect.
- Extract Email Addresses from Thunderbird: handy if your EML files come from a Thunderbird export.