LocalToolkit
HomeText Tools › Extract Emails, URLs and Numbers

Extract Emails, URLs and Numbers from Text

Pull the structured values out of prose or pasted logs — deduplicated, in order.

🔒 Runs in your browser. Nothing is uploaded — verify it in the network panel, or disconnect and try again.

Why this is harder than one regular expression

Pattern matching is the easy part; deciding what counts is where extraction goes wrong. Consider the practical ambiguities: does example.com count as a URL when it has no scheme? Is 192.168.1.1 a host address or a version number? Does +1 555 0100 include the country code? Does an email written as name (at) domain (dot) com count — it does not match any pattern, and the person who wrote it deliberately obfuscated it.

TargetConservative rule used hereExcluded on purpose
EmailLocal part, @, domain with a dot, valid TLD lengthAnything with spaces, and bracketed obfuscations
URLhttp://, https:// or // with a hostBare hostnames and email domains
PhoneA run of digits with optional +, spaces, dashes or parenthesesShort runs that look like dates or IDs
IPv4Four octets, each 0–255Anything with an octet above 255

Extraction is not validation

A string that matches the email pattern is not necessarily a deliverable or real address. Syntax and deliverability are different questions: a@b.co is syntactically valid, and admin@example.com is reserved by the IETF specifically for documentation and can never receive mail. If you need verified addresses, you need an SMTP or API check, not a pattern.

Where this is genuinely useful

The consent and legality line

Extracting addresses from text you were given is ordinary office work. Extracting addresses by crawling the web and then sending unsolicited bulk mail is a different activity with different consequences: it is unlawful in the EU and UK without a lawful basis under the GDPR and PECR, and in the United States it conflicts with the CAN-SPAM Act's requirements around harvesting and misrepresentation. Scraping a site also means accepting its terms of service. The technical capability is neutral; what you do with the output is not.

Order, duplicates and copy-out

Output preserves the order of first appearance, which is usually what you want — it makes it easy to map a result back to the surrounding text. Duplicates are removed on an exact-match basis, so the same address appearing twelve times in a signature block appears once. For case-insensitive deduplication of addresses, fold to lowercase first using the case converter, because mail routing treats the domain as case-insensitive.

How to use it

  1. Paste the text or log.
  2. Select what to extract — emails, URLs, phone numbers or IPv4.
  3. Review the deduplicated list in order of first appearance.
  4. Copy the result and check count and sample before using it.

Worth knowing

  • example.com is reserved by the IETF for documentation and can never receive email.
  • Deduplication is exact-match, so case variants survive separately.
  • Output preserves the order of first appearance in the source text.
  • A syntax match says nothing about whether an address can receive mail.

Limitations

  • Deliberately obfuscated addresses such as name (at) domain (dot) com cannot be found.
  • Phone-number detection is deliberately loose and will miss unusual formatting.
  • No validation of deliverability, DNS records or MX hosts.
  • Extracting addresses by crawling other sites to send bulk mail is unlawful in many jurisdictions.

Frequently asked questions

Does it find obfuscated email addresses?
No. Forms like name (at) domain (dot) com do not match any address pattern, and guessing at them would produce false positives across ordinary prose.
Can I deduplicate case-insensitively?
Not directly — deduplication is exact. Fold the text to lowercase first, which is safe for the domain part of an address and is how mail routing treats it in practice.
Is harvesting email addresses legal?
Extracting addresses from text you were given is fine. Crawling sites to build a list for unsolicited mail is restricted by the GDPR and PECR in Europe and by the CAN-SPAM Act in the US, and it may breach the site's terms of service.
Why did it miss a URL without http?
Because a bare hostname is indistinguishable from a domain in an email address or an ordinary word. Requiring a scheme is the conservative choice, and it avoids matching half the dictionary.
Related tools
Remove Duplicate LinesSort LinesWord Frequency CounterQuery String ParserCase ConverterWord and Character Counter
Keep reading
How browser-only processing worksAll Text Tools toolsEvery tool on the site