How to extract email addresses
- Paste text into the left box, or drop one or more files onto the dashed area. Plain text, CSV, HTML, JSON, XML, saved emails (
.eml) and contact cards (.vcf) all work, because they are read as text. - The list on the right updates as you type. Each address appears once, in the order it was first found.
- Use Only domains or Exclude domains to narrow the list, or click a domain in the summary table to keep just that domain.
- Pick a sort order and separator, then click Copy, TXT or CSV. The CSV has three columns:
email,local_partanddomain.
Choose the Semicolon or Comma separator when you want to paste the list straight into the To or Bcc field of an email client. Outlook uses semicolons by default; Gmail accepts commas.
A worked example
Suppose you paste this fragment of a web page:
<a href="mailto:Sales@Example.com">Sales</a>
Support: support@example.com. Jobs: jobs [at] example [dot] org
Press: press@example.net, sales@example.com
<img src="logo@2x.png">
With the default settings the extractor returns four addresses: Sales@Example.com, support@example.com, jobs@example.org and press@example.net. Here is why:
- The
mailto:prefix is not part of the address, so it is dropped. - The full stop after
support@example.comends the sentence, not the domain, so it is not included. jobs [at] example [dot] orgis a common way to hide an address from scrapers. With decoding on, bracketed[at],(at),{at}and the same forms ofdotare turned back into@and..press@example.netis the HTML entity form of the at sign that appears in page source. Decoding also handles@,@and URL-encoded%40.sales@example.comis a duplicate ofSales@Example.comwhen case is ignored, so only the first spelling is kept. Tick Lowercase if you want every address in lower case.logo@2x.pngis a retina image file name, not an address. Matches whose “domain” ends in an image, style or script extension (.png,.jpg,.gif,.webp,.svg,.css,.jsand similar) are ignored.
What the extractor counts as an email address
The pattern looks for a local part, an at sign and a domain:
[A-Za-z0-9._%+-]+@(?:[A-Za-z0-9](?:[A-Za-z0-9-]{0,61}[A-Za-z0-9])?\.)+[A-Za-z]{2,63}
- Local part: letters, digits, dots, underscores, percent, plus and hyphen. This covers almost every real address, including plus-addressing such as
name+newsletter@gmail.com. Leading, trailing and doubled dots are not allowed in a valid address, so they are trimmed off the match. - Domain: one or more labels separated by dots, each up to 63 characters, not starting or ending with a hyphen, followed by a top-level domain of at least two letters. Multi-part domains such as
.co.ukand long TLDs such as.technologyare kept whole.
The full email standard (RFC 5322) allows rarer characters such as !, # and quoted local parts with spaces. Those are almost never used in practice, and allowing them makes the pattern grab surrounding punctuation from ordinary text, so they are deliberately left out. Internationalised addresses with non-Latin letters (for example a Cyrillic domain) are also not matched; their punycode form (xn--…) is.
Common problems and fixes
An address is missing
Check how it is written in the source. Addresses split across lines, written as images, or obfuscated with words outside brackets (“name at domain dot com”) are not detected. The bracketed forms are, as long as decoding is on. If you are pasting from a PDF, the PDF may have inserted a space or line break inside the address.
An address has extra characters at the start
Text such as tel:555-0100email@example.com, with no space between two values, joins them into one local part. Add a space in the source, or fix the one address by hand.
Word documents and PDFs
Files are read as text. .docx, .xlsx and .pdf are compressed or binary formats, so dropping them here finds little or nothing. Open the document, select all, copy and paste the text instead, or export a spreadsheet as CSV first.
Very large inputs
Everything runs in your browser tab. Several megabytes of text extract in well under a second on a typical computer; very large log files may take a few seconds. Turn off live updates by clearing the box and using Extract once if typing feels slow.
Extract emails in code
Python, keeping the first spelling of each address:
import re
PATTERN = re.compile(r"[A-Za-z0-9._%+-]+@(?:[A-Za-z0-9-]+\.)+[A-Za-z]{2,63}")
def extract(text):
seen, out = set(), []
for m in PATTERN.findall(text):
m = m.strip(".")
if m.lower() not in seen:
seen.add(m.lower())
out.append(m)
return out
JavaScript:
const re = /[A-Za-z0-9._%+-]+@(?:[A-Za-z0-9-]+\.)+[A-Za-z]{2,63}/g;
const seen = new Map(); // lower-case key -> first spelling
for (const e of text.match(re) || []) {
if (!seen.has(e.toLowerCase())) seen.set(e.toLowerCase(), e);
}
const unique = [...seen.values()];
On the command line, grep -Eio '[a-z0-9._%+-]+@[a-z0-9.-]+\.[a-z]{2,}' file.txt | sort -fu gives a sorted, case-insensitively unique list.
Use extracted addresses responsibly
Extracting addresses from your own inbox exports, CRM dumps, sign-up sheets or log files is routine data cleanup. Sending marketing email to addresses collected from other people’s websites is a different matter: anti-spam and privacy laws such as CAN-SPAM in the US, the GDPR in the EU and CASL in Canada set rules on consent, identification and unsubscribing, and mailbox providers penalise senders whose messages get reported as spam. Only email people who expect to hear from you.
This tool does not check whether an address exists or accepts mail. Verification needs a connection to the domain’s mail server, which a browser page cannot make, and nothing you paste here leaves your device.
Frequently asked questions
How do I extract email addresses from text?
Paste the text into the box on this page or drop a text, CSV or HTML file onto it. Every address is listed once on the right, and you can copy the list or download it as TXT or CSV.
Does it remove duplicate email addresses?
Yes. Duplicates are removed case-insensitively, so Ada@Example.com and ada@example.com count as one address. The first spelling found is kept unless you tick Lowercase.
Can I extract emails from a PDF or Word file?
Not directly, because those files are compressed or binary. Open the document, copy all the text and paste it here, or save a spreadsheet as CSV and drop that file in.
Does it find addresses written as name [at] domain [dot] com?
Yes, with decoding switched on (the default). Bracketed [at], (at), {at} and the matching dot forms are converted back before matching. Unbracketed words such as “name at domain dot com” are not, because they collide with normal sentences.
Can I filter the list by domain?
Yes. Type one or more domains in Only domains or Exclude domains, separated by commas. Subdomains match too, so example.com also covers mail.example.com. You can also click a domain in the summary table.
Does the extractor check whether the emails are valid?
It only checks that each match is shaped like an address. Whether the mailbox exists can only be checked by contacting the mail server, which this browser tool does not do.
Is my text uploaded anywhere?
No. The extraction is plain JavaScript running in this page. Files you drop are read by your browser and never sent to a server.