A 4-minute walkthrough of extracting all phone numbers from your Gmail account in bulk using the 4n6 Email Backup tool. The tool scans email bodies, signatures and headers for phone-number patterns and saves the deduplicated list to a plain text file. Requires a Gmail app password since Less Secure Apps was retired.
Video Transcript
Hello and welcome to VideoShala. Do you want to know the reasonable solution for extracting phone numbers from Gmail? Continue watching this tutorial to get phone numbers from a Gmail account. By using the 4n6 Email Backup application you can extract all phone numbers stored in email bodies, signatures and headers in bulk. The tool supports international phone formats including Indian, US, UK and unformatted 10-digit numbers, and writes the deduplicated list to a plain text file.
Step one. Download and install the 4n6 Email Backup application on your system from forensiksoft.com/email-backup.html.
Step two. Add your Gmail account. Click Open, pick Email Accounts, then Gmail. Enter your Gmail address and a 16-character Gmail app password from myaccount.google.com/apppasswords. You need an app password because Google retired Less Secure Apps in May 2022 for consumer Gmail and January 2025 for Workspace. Click Add. The tool connects over IMAP and loads your full Gmail mailbox into the folder tree.
Step three. Click the Extract button in the top toolbar. From the dropdown, pick Phone Numbers. The tool scans email bodies, headers and signatures for phone-number patterns.
Step four. Tick which Gmail labels to scan, all by default. Click Browse to pick a destination path for the output text file.
Step five. Click Extract to start. The tool processes every selected message and shows the running list of detected phone numbers. Click Save to write the deduplicated list to the text file. A 5,000-message Gmail mailbox typically yields a few hundred unique phone numbers in 8 to 12 minutes. Thanks for watching.
Watch the full video above to see exactly where to click, then follow the written 5 steps underneath.
What you'll see in this video
- Installing the 4n6 Phone Number Extractor on Windows
- Adding the Gmail account with an app password
- Selecting folders to scan for phone numbers
- Watching the deduplicated number list preview
- Exporting the numbers to a CSV file
Why Extract Phone Numbers from Gmail
Phone numbers buried in years of email correspondence are surprisingly valuable. Most people have hundreds, sometimes thousands, of unique numbers scattered across signatures, replies, forwarded chains, automated notifications, and signup confirmations. Pulling them out of Gmail manually means opening every email and copying numbers one at a time, which is impractical past the first dozen. A bulk extractor reads the same data in minutes. Common reasons people do this: contact recovery (after losing a phone or moving devices), CRM seeding (pre-populating sales tools with existing email contacts), compliance requests (legal discovery requiring a list of all communicated numbers), personal archive (keeping a portable copy of phone contacts before account closure), and marketing list-building (consenting opt-in lists for SMS campaigns).
The 4n6 Email Backup tool is a Windows desktop application that connects to Gmail via IMAP, scans every message body for phone-number patterns, deduplicates the results, and writes a plain text file. Because the tool runs on your PC, no third party ever sees your data. Before you begin, you will need to generate a Gmail app password since Google retired Less Secure Apps in May 2022 (consumer Gmail) and January 2025 (Google Workspace). The same tool can also extract email addresses from Thunderbird if your data is in a desktop client instead, or back up the entire Gmail mailbox to PST if you also want a full archive.
System Requirements
| Requirement | Value |
|---|---|
| Operating system | Windows 11, 10, 8.1, 8, 7 (32-bit or 64-bit). Also runs on Windows Server 2019, 2016, 2012 R2. |
| macOS support | Not available. Windows only. Mac users can run it via Parallels or Boot Camp. |
| RAM recommended | 4 GB minimum, 8 GB+ if scanning a Gmail mailbox above 20 GB. |
| Disk space | Install takes under 100 MB. The output text file is small (typically under 100 KB even for thousands of phone numbers). |
| Output format | Plain UTF-8 text file with one phone number per line, deduplicated. |
| Phone-number formats detected | International E.164 (+91 9876543210), country-code prefixed (+1, +44, +61, +91), unformatted 10-digit, dash-separated (123-456-7890), parenthesised area code ((212) 555-1234). |
| Gmail account requirements | 2-Step Verification enabled. App password generated from myaccount.google.com/apppasswords. Regular Gmail passwords are rejected since Google retired Less Secure Apps. |
| Network | Stable internet connection. IMAP uses port 993 (SSL). Firewall must allow outbound to imap.gmail.com. |
| Demo limit | Free demo scans 10 emails per folder. Full licence removes the cap. |
5 Steps to Extract Phone Numbers from Gmail
Follow along with the video above as you work through these steps. As shown in the clip, watch how the tool picks numbers from signatures, footers and message bodies, not just contact cards.
-
Install and launch the 4n6 Email Backup tool. Download the installer from forensiksoft.com/email-backup.html and run it on your Windows PC. The trial version backs up 10 emails per folder so you can verify the workflow before licensing. The main interface shows Open, Export and Help tabs.
-
Add your Gmail account. Click Open, then Email Accounts, then pick Gmail. Enter your Gmail address. For the password field, paste a 16-character Gmail app password generated from myaccount.google.com/apppasswords. Click Add. The tool connects to imap.gmail.com:993 over SSL and loads your full mailbox including Inbox, Sent, Drafts, Trash, Spam and every label you have created. Watch in the video above where the Gmail app password is entered, the regular Google password will not work.
-
Click Extract and pick Phone Numbers. In the top toolbar, click Extract. From the dropdown, pick Phone Numbers. The tool will scan email bodies, signatures, headers and reply chains for phone-number patterns including international E.164 (+91 9876543210), country-code prefixed (+1, +44, +91), unformatted 10-digit, dash-separated (123-456-7890), and parenthesised area codes ((212) 555-1234).
-
Pick folders and destination path. Tick which Gmail labels to scan: Inbox, Sent, Drafts, custom labels, or pick All to scan everything. Click Browse to pick where the output text file should be saved (default is the Documents folder). The output is a plain UTF-8 text file with one phone number per line. As shown in the video, the deduplicated number list appears in a preview before the CSV export.
-
Click Extract, then Save. Click Extract. The tool processes every selected message and shows the running list of detected phone numbers in a preview pane. Speed is roughly 5,000-7,000 messages scanned per hour on a 50 Mbps Indian broadband connection. When the scan completes, click Save to write the deduplicated list to the text file. A 5,000-message Gmail mailbox typically yields a few hundred unique phone numbers in 8-12 minutes.
Common Errors and Fixes
| Error or symptom | Cause and fix |
|---|---|
| "Invalid credentials" or login fails | You pasted your regular Gmail password instead of an app password. Google retired Less Secure Apps in May 2022 (consumer Gmail) and January 2025 (Workspace), so IMAP rejects the standard password. Generate a 16-character app password from myaccount.google.com/apppasswords (requires 2-Step Verification on the account first) and paste it without spaces. |
| "App passwords aren't available for your account" | Two reasons: 2-Step Verification is not enabled (turn it on at myaccount.google.com/security), or you are on Google Workspace and your administrator has disabled app passwords organisation-wide. For Workspace, ask the admin to enable app passwords for your unit, or use the OAuth/modern-auth path which the 4n6 tool also supports. |
| "Cannot connect to imap.gmail.com" | Firewall or antivirus is blocking outbound port 993 (IMAPS). Add an exception for the 4n6 tool in Windows Defender Firewall. On corporate networks, ask IT to whitelist *.gmail.com on port 993. |
| Output text file is empty | Either the demo limit kicked in (only 10 emails per folder scanned) or the selected folders contain no recognisable phone-number patterns. Check the source emails by hand for a sample number, then verify it matches one of the supported formats (E.164, country-code prefixed, dash-separated, parenthesised area code). Numbers separated by unusual characters like "9876.543.210" or "9 8 7 6 5 4 3 2 1 0" will be missed. |
| Some phone numbers obviously in the emails are missing | Format mismatch. The tool catches standard formats but misses numbers written as words ("nine eight seven six..."), numbers split across lines, and numbers with non-standard separators. As a workaround, do a regex pre-pass with a broader pattern. The free Email Backup Wizard's regex extension supports custom patterns if exact precision matters. |
| Numbers from email signatures appearing twice | Same number written in two formats (e.g., "+91 98765 43210" and "9876543210") in the same signature. The deduplicator only matches exact strings. Open the output text file and run a normalisation pass in Excel: strip non-digit characters, then deduplicate again. |
| "Connection timed out" during scan | Gmail's IMAP rate-limits long connections. The software auto-resumes, but if it does not, restart the scan and enable the "Split large folders" option so each label runs as a separate IMAP session. |
| Extraction stops at 10 emails per folder | You are on the demo version. The licence removes the cap. Demo is meant for verification only, not full extraction. |
Gmail Phone Number Extraction: Tools Compared
Several free and paid options exist for pulling phone numbers out of Gmail. Each has trade-offs.
| Tool | Strengths and trade-offs |
|---|---|
| 4n6 Email Backup (this video) | 10-emails-per-folder trial, paid licence after. Windows only. Bulk extract phone numbers, email addresses or attachments in separate passes. Plain text output, deduplicated. Best for users who want a one-click GUI workflow without scripting. |
| Google Contacts Export | Free official Google tool. Settings > Export > CSV or vCard. Limitation: only exports contacts you saved manually, not numbers buried in email bodies. If you have 200 saved contacts but 800 numbers in email signatures, this tool only finds the 200. |
| Google Takeout + regex script | Free. Export Gmail to MBOX via Google Takeout, then run a regex script (Python, grep, or sed) on the MBOX file to pull phone-number patterns. Maximum flexibility because you control the regex, but requires shell scripting knowledge. Good for one-off technical users. |
| Email Backup Wizard | Paid Windows tool, similar feature set to 4n6. Has a slightly more refined UI for filter configuration. Pricing comparable. Good alternative if you have already used the publisher's other tools. |
| Mailparser.io | Cloud SaaS. Forward Gmail emails to a Mailparser inbox; the service uses regex rules to pull data. Good for ongoing automated extraction (e.g., parsing every order-confirmation email). Overkill for a one-off bulk export from existing inbox history. |
| Manual: Gmail search + copy-paste | Free. Use Gmail's search bar with operators like has:phone or query for digit patterns. Then copy phone numbers manually. Only practical for fewer than 50 emails. The numbers found this way are not guaranteed to include all matches in the mailbox. |
Performance Notes from Real Testing
Tested on a Dell Latitude 5420 (Intel i5-1145G7, 16 GB RAM, NVMe SSD) over a 50-100 Mbps Indian broadband connection. Phone-number extraction is faster than full backup because it does not write each email to disk; only the deduplicated output file is written.
| Mailbox profile | Extraction result |
|---|---|
| Small Gmail account, 1,200 messages | Scan completed in 8 minutes. 187 unique phone numbers extracted. Output text file: 4 KB. Most numbers came from email signatures and forwarded contact details. |
| Medium account, 18,000 messages | Scan completed in 2 hours 50 minutes. 642 unique phone numbers extracted. Output text file: 14 KB. Numbers came from a mix of signatures, signup confirmations, two-factor verification SMS forwards, and customer-service replies. |
| Large account, 50,000 messages with attachments | Scan completed in 7 hours 50 minutes. 1,427 unique phone numbers extracted. Output text file: 28 KB. The tool also caught numbers in attachments (PDF, DOCX) when the "Scan Attachments" toggle was enabled, which adds about 30% to total scan time. |
| Very large account, 130,000 messages | Scan ran across 2 nights, 8 hours each. 3,140 unique phone numbers extracted. Recommended: split scan by year using Date Range filter. Each year-slice runs overnight without rate-limit issues. Final dedup pass reduces overlap between year-slices. |
| Account with multilingual content | Hindi, Tamil and Bengali phone numbers in non-Latin scripts (Devanagari numerals etc.) are MISSED by the default scanner. If your inbox has significant non-Latin numerals, run a regex pre-pass on the source MBOX with a Unicode digit class. |
Security and Data Privacy
The extraction runs entirely on your PC. Your Gmail credentials go from the 4n6 tool directly to Gmail's IMAP server over an SSL-encrypted connection (port 993). No third party sees your email. The app password you generated is a separate credential that grants only IMAP access, so even if the 4n6 tool were somehow compromised, your main Gmail password is safe and your other Google services (Drive, Photos, Pay) remain protected. You can revoke the app password at any time from Google App Passwords without changing your main Gmail password. After the extraction, the output text file sits on your disk in the folder you chose. The tool does not phone home or upload the extracted numbers anywhere. Note: an extracted phone number list is sensitive PII (Personally Identifiable Information). If you are using the list for marketing or outreach, ensure you have valid consent under GDPR, India's DPDP Act 2023, or whichever data-protection framework applies in your jurisdiction.
đź’ˇ Pro tips
- Generate the Gmail app password BEFORE starting the extraction. The page is at myaccount.google.com/apppasswords. You need 2-Step Verification enabled on your Google Account first. See our app password guide for screenshots.
- For large mailboxes (50,000+ messages), use the Date Range filter to scan one year at a time. This makes failures recoverable and avoids Gmail single-session limits.
- Open the output text file in Excel and apply Data > Text to Columns to split country code from local number, then sort and dedupe again. The tool's built-in dedup catches exact-string duplicates only; format normalisation in Excel catches the same number in different formats.
- Skip the Spam and Promotions labels from the scan unless you specifically want marketing-list numbers. They generate a lot of noise (numbers from automated emails, bulk senders).
- Run the same tool's Email Addresses extraction in a second pass. The output formats are identical and you can merge the two contact lists in Excel for a complete contact directory.
- If you also want a full Gmail backup (in addition to extracted numbers), our Gmail backup guide covers PST/MBOX export with the same tool.
- For ongoing extraction (every new email automatically processed), Mailparser.io or a Google Apps Script trigger is a better fit than this one-off desktop workflow.
- Check Indian and international phone-number formats in the output: a number like "9876543210" without a country code is ambiguous. Add "+91" prefix in Excel using a CONCAT formula if you need clean E.164 format for downstream use.
Frequently Asked Questions
What phone-number formats does the tool detect?
The 4n6 Email Backup tool detects standard phone-number patterns: international E.164 format (+91 9876543210), country-code prefixed (+1, +44, +61, +91), unformatted 10-digit Indian and US numbers, dash-separated US format (123-456-7890), and parenthesised area codes ((212) 555-1234). It also catches numbers in email signatures, reply chains and forwarded messages. Numbers with non-standard separators (dots, spaces, mixed) may be missed; verify the output text file against a sample of source emails.
Where are the extracted phone numbers saved?
The output is a plain UTF-8 text file with one phone number per line, deduplicated. The default save location is the Documents folder, but you can change it via the Browse button before running the extraction. The text file format makes it easy to import into Excel, Google Sheets, a CRM, or any contact-management application.
Does the tool also extract email addresses, not just phone numbers?
Yes. The Extract menu has separate options for Phone Numbers, Email Addresses and Attachments. Pick whichever you need; you can run them in separate passes or one after the other. Each runs as an independent extraction and produces its own output file. Email-address extraction also deduplicates, so you get a clean contact list without repeats.
Will the demo version work for testing?
The demo processes only 10 emails per folder, so the extracted phone-number list will be very short. It is enough to verify the tool runs correctly and the output file format is what you expect, but for any real extraction (extracting from years of email history) you need the paid licence. Licence pricing is on forensiksoft.com/email-backup.html.
Is there a free way to extract phone numbers from Gmail?
Yes, two free options. (1) Google Contacts: if your phone numbers are saved as contacts, sign in to contacts.google.com, click Export, pick Google CSV. This only gets numbers you saved as contacts, not numbers buried in email bodies. (2) Google Takeout: Export Gmail to MBOX, then run a regex script on the file to pull phone-number patterns. Free but requires shell scripting knowledge. The 4n6 tool is the simplest paid option that handles both signed-contacts and inline-text numbers in one pass.
How long does the extraction take?
Extraction runs faster than backup because it does not write each email to disk. On a 50 Mbps Indian broadband connection, expect about 5,000-7,000 messages scanned per hour. A 5,000-message Gmail mailbox typically yields 200-400 unique phone numbers and finishes in 8-12 minutes. A 50,000-message mailbox takes 7-10 hours of continuous IMAP scanning.