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. Phone numbers in an MBOX live as free text in signatures and message bodies, not in a tidy field, so pulling them out means scanning for number patterns. A short Python script reads the .mbox and lists them for free, or a tool scans the whole mailbox into a deduped list. Either way, sanity-check the results, since patterns catch the odd false number.
On this page
Where phone numbers hide in an MBOX?
Here is the thing that shapes the whole job. Email addresses are easy to pull because they sit in tidy From, To and Cc fields. Phone numbers are not like that. They live as ordinary free text, tucked into a sender’s signature, dropped into the body of a message, and now and then carried in a vCard attachment. There is no phone field to read. So extracting them means reading through the text of every message and picking out anything that looks like a number, which is a different and slightly messier task than it sounds.
Numbers turn up in the text of the message, not in a neat field of their own.
“In forensics I treat a pulled phone list as a lead, not a fact. Because the numbers are free text, whatever finds them, a script or a tool, is really matching a pattern, so it will grab an order reference or a date that happens to look like a number and it will miss an oddly formatted one. That is fine as long as you know it and check the output. I also remind people that a mailbox of numbers is personal data, so pull it for a reason you can stand behind, your own records or a proper investigation, not to build a cold-call list.” Shubham Dixit, Email Forensics reviewer (draft, pending approval)
Why extraction is never exact?
This follows straight from the last point, and it is worth saying plainly. Since a phone number is just text, any method works by matching a pattern, a run of digits with the usual spaces, dashes and brackets. That pattern cannot tell a phone number from an order reference, a long date, or a tracking code that happens to look similar, so a few of those slip in. It can also miss a number written in an unusual way. Neither a script nor a paid tool escapes this, they are both pattern-matchers underneath. So treat the result as a strong draft and give it a quick read before you rely on it.
A scan keeps the real numbers but also grabs a few lookalikes, so a quick check pays off.
The free way, a short script
If you are comfortable running a little code, Python does this for free and you stay in control of the pattern. It uses the built-in mailbox module to read the .mbox, walks the text of each message, matches anything that looks like a phone number, and keeps a deduped set. Save this as a .py file next to your mailbox and run it.
import mailbox, re
phone = re.compile(r'\+?\d[\d\s().-]{7,}\d')
found = set()
for message in mailbox.mbox('mailbox.mbox'):
for part in message.walk():
if part.get_content_type() == 'text/plain':
raw = part.get_payload(decode=True)
if not raw:
continue
text = raw.decode(part.get_content_charset() or 'utf-8', 'ignore')
for hit in phone.findall(text):
found.add(hit.strip())
with open('phones.txt', 'w') as out:
for number in sorted(found):
out.write(number + '\n')
Change the file name to your own, and the regex to suit the numbers you expect. This route is free, private, since nothing leaves your machine, and easy to rerun after you tweak the pattern.
A tool for the whole mailbox
If code is not your thing, or the mailbox is large and you want a clean deduped list without fiddling, a tool does the same scan in a window. The PCDOTS MBOX Converter reads the .mbox, walks every message, and writes the phone numbers it finds to a list you can save, on Windows, with a free version that pulls the first ten so you can see the output before you buy. It is still a pattern scan under the hood, so the same quick check applies, but it saves the scripting and covers the whole mailbox in one pass.
The tool route, a whole .mbox scanned into a deduped list of numbers.
Here are the tool steps with the screens.
Step 1. Install and run the software on Windows, then open the menu.

Step 2. Choose MBOX files and add your .mbox.

Step 3. Open Extract and choose Phone numbers.

Step 4. Pick a destination and let it write the list.

For related jobs see our guides to extract phone numbers from EML files and convert MBOX to CSV. To just read the mailbox first, our free MBOX viewer opens it without a client.
Using the numbers responsibly
One honest word on what the list is for. A pile of phone numbers pulled from a mailbox is personal data, so pull it for a reason you can stand behind, tidying your own contacts, keeping business records, answering a discovery or compliance request, or a proper investigation. Reaching people who gave you their number in the course of real correspondence is reasonable. Scraping a mailbox to build a cold-call or marketing list of people who never agreed to hear from you is not, and in many places it is against the rules on unsolicited contact. Extract for your own legitimate use, and keep the file somewhere safe.
The methods compared
Pick by your comfort with code and the size of the mailbox.
| Method | Best for | Good to know |
|---|---|---|
| Python script | Free, happy with code | You control the pattern |
| MBOX Converter tool | A large mailbox, no code | Windows, deduped list |
| Either way | A usable list | Check it for false hits |
Frequently asked questions
Where are phone numbers stored in an MBOX file?
Not in a field. They sit as free text in signatures and message bodies, and sometimes in a vCard attachment, so you scan the text to find them.
Can I extract phone numbers for free?
Yes. A short Python script using the mailbox module and a regex reads the .mbox and writes a deduped list, at no cost and without anything leaving your computer.
Why does the list include numbers that are not phones?
Because extraction matches a pattern, and order references, dates or tracking codes can look like phone numbers. Give the list a quick read to weed those out.
Will it find every number?
Not always. A number written in an unusual way can slip past the pattern. Widening the regex helps, but no method is perfect on free text.
Do I need Outlook or a mail client?
No. Both the script and the tool read the .mbox file directly, so no email client needs to be installed.
Is it legal to extract phone numbers from emails?
For your own records or a legitimate investigation, yes. Using the list to cold-contact people who never agreed to hear from you can breach privacy and anti-spam rules.
Before you use the list
Once the numbers are out, you are nearly there, but give yourself one more minute. Open the file and skim it, drop the obvious lookalikes, an order number here, a stray date there, and you have a clean list you can trust. From there it slots into your contacts or your case notes, whatever you gathered it for. Keep it somewhere safe, use it for the reason you pulled it, and if you ever need the same from another mailbox, the script and the tool are both waiting, one quick check away from a tidy result.