Email Extraction

How to Extract Email Addresses from Text, HTML and CSV Files

Updated October 22, 2026 · 8 min read

Featured image for How to Extract Email Addresses from Text, HTML and CSV Files

Quick answer: How to Extract Email Addresses from Text, HTML and CSV Files

Paste the text, HTML source, or spreadsheet export into a browser-based email extractor, then clean the matches before you use them. A reliable pass finds addresses, ignores surrounding punctuation, and leaves each one on its own line. Deduplicate, drop broken rows, and keep only contacts you are allowed to use.

Key takeaways from How to Extract Email Addresses from Text, HTML and CSV Files

  • Treat every source as text: forwarded mail, page source, and CSV exports all work the same way.
  • Only extract addresses from content you own or have a clear reason to process.
  • HTML hides addresses in visible text and in mailto links, so the raw source is the safer copy.
  • Cleanup matters more than the extract: duplicates, typos, and system addresses should not stay in the list.
  • A pattern match shows that a string looks like an address. It does not prove the mailbox exists.

Make sure you are allowed to use the data

Extraction is a data-handling task, not a permission slip. Process content you own or have a legitimate reason to work with: your own inbox, a CRM export, event registrations, or contacts who gave you their address. If you plan to send marketing email, you also need consent that satisfies the rules where your recipients live, such as GDPR in Europe, CAN-SPAM in the United States, or the DPDP Act in India. Starting with that limit saves you from building a list you cannot legally use.

Do not turn obfuscated text such as "name at company dot com" back into an address. That spelling is usually a deliberate choice by the owner. Leave it alone.

What an extractor actually looks for

Every email address has the same basic shape: a local part, the @ symbol, and a domain with at least one dot, such as name@company.com. A good extractor scans for that pattern, ignores surrounding punctuation such as brackets, quotes, and trailing full stops, and returns each match on its own line. It should also cope with uppercase letters, plus-addressing (name+news@company.com), and subdomains (team@mail.company.co.uk).

What it should not do is invent addresses. A pattern match is a syntax check. It cannot tell you whether the mailbox exists, whether the person still works there, or whether they agreed to hear from you. Keep that distinction in mind when you look at a long output list. The count is a starting point, not a count of reachable people.

Extracting addresses from plain text

Plain text is the easiest case: emails, chat logs, meeting notes, or a block copied from a PDF. Copy the full text, including headers and signatures if they contain the addresses you need. Paste it into the Email Extractor. Processing happens in your browser, so the content is not uploaded.

  1. Copy the full text, including signatures and forwarded headers when those hold the addresses you need.
  2. Paste it into the extractor and wait for the list to appear.
  3. Scan for obvious problems, such as an address glued to a word because a space was lost during copying.
  4. Copy or download the result, then move on to cleanup before you import it anywhere.

Text copied from PDFs sometimes breaks a long address across two lines, for example "very.long.name@" on one line and "company.com" on the next. If you see matches that end in @, open the source, join those lines, and run the extraction again.

Extracting addresses from HTML

Web page source and HTML email templates hide addresses in several places: visible text, mailto links, form attributes, and sometimes comments. Copying only the visible page text can miss the mailto links. Copying the raw source catches them.

  1. Open the page or template source. In most browsers, right-click and choose View page source.
  2. Copy the whole source and paste it into the extractor.
  3. Expect noise. HTML often contains placeholders such as noreply@, example@example.com, or addresses that belong to the site platform.
  4. Remove anything that is not a real contact before you merge this list with others.

The same address often appears once in a link and again in the visible text. HTML extraction almost always produces duplicates. That is normal, and it is easy to fix in the cleanup step below. Do not treat the raw line count as the number of people.

Extracting addresses from CSV exports

CSV files from CRMs, form tools, and event platforms usually have an email column, but it is rarely the only place an address appears. You might find two addresses in one cell separated by a semicolon, an address inside a notes column, or extra columns that were added later. Rather than fighting the spreadsheet layout, treat the file as text.

  1. Open the CSV in a text editor, or select all cells in the spreadsheet and copy them.
  2. Paste everything into the extractor. Commas, tabs, and semicolons are treated as separators, so each address comes out on its own line.
  3. For several large exports, use a bulk extractor built for bigger batches, then run the same cleanup.
  4. Keep the original file. Extraction gives you addresses. Your spreadsheet still holds names, companies, and the source of each row.

This approach also catches addresses hiding in columns you were not expecting. A secondary billing contact in a notes field is a common example, and it is often the person who can actually reply.

Clean the list before you use it

Raw extraction output is a starting point, not a finished list. Three short passes make a large difference, and they take less time than explaining a bad send later.

Remove duplicates

Combining several sources almost guarantees repeats, and the same person may appear in different capitalisation. Run the list through Remove Duplicate Emails so each address appears once. Duplicates are not only untidy. Our guide on why duplicate emails hurt campaign performance covers the effect on complaints and engagement.

Fix or drop malformed entries

Look for addresses with spaces, double dots, a missing top-level domain, or a trailing character that the pattern still accepted. A syntax check catches these quickly. Anything you cannot confidently correct should be removed rather than guessed at. Guessing a domain from a typo creates a stranger's address.

Filter what you do not need

Depending on your goal, you may want to drop role addresses such as info@ or admin@, separate company domains from personal webmail, or exclude disposable domains. The companion guide on how to segment business and personal email addresses walks through that split and how to treat each group.

A worked example from three sources

Imagine you ran a webinar and have three sources: the registration CSV, a thread of attendees who emailed questions, and the HTML of a partner page listing speakers. You paste all three into the extractor and get 640 lines. After removing duplicates you have 512. A syntax check drops 9 malformed entries. Filtering out noreply@ and platform addresses removes another 6. You now have 497 real, unique contacts, and you still know which file each group came from.

What changed between the raw extract and the list you can use
StepRows leftWhat left the list
Raw extract from three sources640Nothing yet
Duplicates removed512Repeated addresses, including case variants
Syntax check503Broken or truncated addresses
System addresses removed497noreply@ and platform placeholders

The important part is not the final number. It is that webinar registrants who opted in and speakers listed on a partner page stayed separable. They are not the same audience, and they should not receive the same follow-up.

Mistakes that waste the cleanup

  • Mixing sources that have different permissions. Keep opted-in registrants apart from people who were merely named on a page.
  • Trusting the extractor blindly. A match tells you the string looks like an address. Verify before any large send.
  • Throwing away context. If names or company fields matter, keep the original file next to the extracted list.
  • Skipping cleanup. A list full of duplicates and typos is one of the faster ways to damage sender reputation.
  • Rebuilding obfuscated addresses. If the author wrote "name at company dot com", they did not hand you a mailbox.

Keep contact data on a trusted device

Contact data is personal data. Work on a trusted device, avoid pasting lists into tools that upload content to unknown servers, and delete working copies you no longer need. Browser-based tools that process data locally reduce that risk because the content never leaves your machine. When you are done, the original export still belongs in whatever system already governs access to it, not in a downloads folder you forget about.

Extracting addresses is quick once you treat every source as text: paste it, extract, then clean. The extract itself takes seconds. The value comes from the cleanup, which means removing duplicates, dropping broken entries, and keeping only the audience you actually have permission to contact. Do those steps the same way every time and each list you build will be smaller, cleaner, and more useful than the raw paste you started with.

Advantages of How to Extract Email Addresses from Text, HTML and CSV Files

  • Works on text, HTML source, and spreadsheet exports with the same steps
  • Runs in the browser, so the pasted content is not uploaded
  • Catches addresses hiding in notes columns and mailto links
  • Pairs naturally with a dedupe and a syntax check

Limitations of How to Extract Email Addresses from Text, HTML and CSV Files

  • A pattern match does not prove the mailbox exists
  • PDF line breaks can split one address into two lines
  • HTML extracts include placeholders you still have to remove by hand

Try Free Email Extractor after reading

Extract email addresses with names, companies and websites from plain text, CSV or HTML. Filter business vs personal, dedupe and export to CSV, XLSX or TXT.

Open Free Email Extractor - it's free

Questions about How to Extract Email Addresses from Text, HTML and CSV Files

Can I extract email addresses from a PDF?
Yes, if you can copy the text out of it. Paste that text into the extractor. Watch for addresses that were split across two lines by the PDF layout. Join those lines in the source and run the extract again. A scanned PDF that is only an image has no text to paste until you run it through a text recognition step of your own.
Does copying HTML source find more addresses than copying the page?
Often, yes. Visible page text misses addresses that exist only inside mailto links, form fields, or comments. The raw source includes those. It also includes more noise, such as example addresses and platform mailboxes, so plan on a cleanup pass either way.
Should I extract the whole spreadsheet or only the email column?
Pasting the whole sheet is useful when addresses hide in notes or secondary columns. If you already know the email column is clean and complete, copying just that column is enough and produces less noise. Keep the original file either way so names and consent notes stay attached to the right person.
Why does the same address appear twice?
HTML often prints an address in the page and again inside a mailto link. Spreadsheets do the same when one person is both a primary contact and a billing contact. Deduplicating after the extract, with case ignored, collapses those copies into one row.
Is an extracted list ready to email?
Not yet. Remove duplicates, drop malformed rows, and separate people you have permission to contact from people who were only mentioned in a document. A syntax match is not consent, and it is not proof that the mailbox still exists. Verify before a large send.
What should I do with noreply and example addresses?
Remove them. They show up constantly in HTML templates and exports, and mailing them helps no one. The same goes for obvious placeholders such as example@example.com. If you are unsure whether an address is a real person, leave it out until you can check the source.

More reading about Email Extraction

Tools mentioned in How to Extract Email Addresses from Text, HTML and CSV Files