Skip to content

Mb-hunt/WhatsApp-Contact-Extractor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

10 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ“± WhatsApp Group Contact Extractor

Extract all contacts from any WhatsApp group in seconds β€” no apps, no extensions, just one script.

License: MIT Platform JavaScript GitHub stars GitHub forks



Perfect for marketers, community managers, and growth hackers who need contact lists from WhatsApp groups β€” fast.

Featured on: Product Hunt Β· DEV.to Β· Hacker News Β· DevHunt


πŸ€” What Is This?

A simple copy-paste JavaScript snippet that runs in your browser's developer console on WhatsApp Web. It automatically scrolls through a group's member list, extracts every contact, and downloads a clean .tsv file you can open in Excel, Google Sheets, or any spreadsheet app.

What You Get

Column Description
formatted_phone Phone number in international format (e.g. +2348012345678)
is_my_contact Yes if saved in your contacts, No if unsaved
saved_name The name you saved them as (if applicable)
public_name Their WhatsApp display name / "About" name

⚑ Quick Start (5 Minutes)

Prerequisites

  • A computer with a modern browser (Chrome, Edge, Firefox, Brave)
  • Your WhatsApp account linked to WhatsApp Web
  • You must be a member of the group you want to extract from

Step-by-Step

Step 1 β†’ Open WhatsApp Web & connect your account
Step 2 β†’ Open the group chat β†’ Click the group name at the top
Step 3 β†’ Click on the members section so the full member list panel opens
Step 4 β†’ Press F12 to open Developer Tools β†’ Click the "Console" tab
Step 5 β†’ Type: allow pasting  (and hit Enter β€” only if the browser asks)
Step 6 β†’ Copy everything from whatsapp_extractor_v3.js, paste it into the console, hit Enter
Step 7 β†’ Don't touch anything β€” let it run for 1–3 minutes
Step 8 β†’ A .tsv file auto-downloads. Open it in Excel or Google Sheets. Done!

🍎 Mac Users: Use Cmd + Option + J (Chrome) or Cmd + Option + I (Firefox/Safari) to open the console instead of F12.


πŸ–₯️ Visual Walkthrough

1. Open the Group Members Panel

Open WhatsApp Web β†’ click the group name β†’ click on the members count to expand the full member list.

2. Open the Console

Press F12 β†’ click the Console tab. If you see a warning about pasting, type allow pasting and press Enter.

3. Paste & Run

Copy the entire contents of whatsapp_extractor_v3.js, paste it into the console, and press Enter.

4. Wait for the Magic

You'll see real-time progress logs in the console:

πŸ” STEP A: Finding the members scroll panel...
βœ… Found the panel! (42 members visible, scrollHeight: 3200px)
🟒 You should see a GREEN border flash around the members list.
⏳ Auto-proceeding to extraction in 3 seconds...
πŸš€ EXTRACTING CONTACTS...
⏳ Phase 1: Scrolling to bottom to load all members...
   Scrolling... loaded ~120 elements (scroll 0)
   Scrolling... loaded ~340 elements (scroll 30)
πŸ“‹ Phase 2: Extracting contacts (scrolling back up slowly)...
   Extracted 156 contacts... (scroll 50)
   Extracted 287 contacts... (scroll 100)

πŸŽ‰ COMPLETE! Extracted 312 contacts

πŸ“₯ File downloaded: whatsapp_group_contacts.tsv

πŸ“Š Summary:
   Total contacts: 312
   Your saved contacts: 89
   Unsaved (phone only): 223

5. Open Your File

The downloaded whatsapp_group_contacts.tsv opens directly in Excel or Google Sheets. Each row is a contact with their phone number, name, and whether they're saved in your phone.


πŸ“Š Output Sample

formatted_phone is_my_contact saved_name public_name
+2348012345678 No John D.
+447911123456 Yes Alice Smith Alice
+12025551234 No Marketing Pro
+919876543210 Yes Raj Kumar Raj

πŸ’‘ Use Cases

  • πŸ“£ Marketing campaigns β€” Build targeted outreach lists from niche WhatsApp communities
  • 🀝 Networking β€” Save contacts from professional groups and events
  • πŸ“‹ Community management β€” Audit and track group membership
  • πŸ“ˆ Lead generation β€” Capture prospects from industry-specific groups
  • πŸ—‚οΈ CRM import β€” Export contacts directly into your CRM or mailing list

❓ FAQ

Is this safe to use?

Yes. The script runs entirely in your browser β€” no data is sent to any server. Everything stays on your computer. The code is open source, so you can read every line.

Will my WhatsApp account get banned?

This script simulates scrolling through the members list β€” something you can do manually. It doesn't use any unofficial APIs or modify WhatsApp's code. That said, use responsibly and avoid running it excessively in a short period.

Why is it downloading a .tsv instead of .csv?

TSV (Tab-Separated Values) handles phone numbers and international characters better than CSV. It opens perfectly in Excel and Google Sheets without any extra configuration.

The script says "Could not find the members panel"

Make sure the members list panel is fully open and visible on screen. Click the group name β†’ click the members count β†’ you should see a scrollable list of names/numbers.

It extracted 0 contacts

Try scrolling the members list manually once (up and down), then run the script again. This helps WhatsApp load the DOM elements the script looks for.

Can I use this on WhatsApp Desktop app?

No. This only works on WhatsApp Web in a browser. The desktop app doesn't expose a developer console the same way.

How large a group can it handle?

It has been tested on groups with 1000+ members. Larger groups just take longer to scroll through (3–5 minutes).


πŸ›‘οΈ Privacy & Ethics

  • βœ… 100% client-side β€” no data ever leaves your browser
  • βœ… No tracking, no analytics, no telemetry
  • βœ… Open source β€” audit every line of code yourself
  • ⚠️ Respect privacy β€” only extract contacts from groups where you have legitimate access
  • ⚠️ Follow local laws β€” ensure your use complies with data protection regulations (GDPR, etc.)

🀝 Contributing

Contributions are welcome! If you have ideas, bug fixes, or improvements:

  1. Fork this repository
  2. Create a feature branch (git checkout -b feature/amazing-improvement)
  3. Commit your changes (git commit -m 'Add amazing improvement')
  4. Push to the branch (git push origin feature/amazing-improvement)
  5. Open a Pull Request

πŸ“„ License

This project is licensed under the MIT License β€” see the LICENSE file for details.

You are free to use, modify, and distribute this tool. No strings attached. πŸŽ‰


⭐ Star This Repo

If this saved you time, drop a ⭐ β€” it helps others discover the tool!


Made with β˜• and curiosity.