Toolstia / Extract emails and links
Extract emails and links from text
Long text often hides the useful parts. A copied email thread, a saved web page, a contact list exported from a spreadsheet or a pile of meeting notes can contain dozens of addresses and links scattered between sentences. This tool scans whatever you paste and gives you two separate lists, one of email addresses and one of web links, each with a count, so you can copy or download them straight away.
You can remove duplicates, which is on by default, and sort each list alphabetically. Duplicate removal ignores the case of email addresses, so a contact who appears three times in different capitalisations is listed once. Each list can be copied to the clipboard or saved as a plain text file, one item per line, which is a convenient shape for pasting into a spreadsheet, a checker or a mail client.
Everything runs in the page, and the text you paste is not uploaded. The tool finds text that has the shape of an address or a link. It cannot tell you whether the address exists or the link works, and the details below explain what it will and will not catch.
How it works
- Paste your text.
- Choose whether to remove duplicates and sort.
- Copy a list or download it.
What counts as a link
Anything starting with http://, https:// or www. is picked up. Punctuation at the end of a sentence, such as a full stop or a closing bracket, is not included in the link.
Duplicates
With Remove duplicates on, each address appears once. Email addresses are compared without regard to upper or lower case, so [email protected] and [email protected] count as the same.
Be sensible with the results
Use extracted email addresses only in ways that are lawful and fair to the people who own them. Sending unrequested bulk email is against the law in many countries.
Limits
The tool finds text that looks like an address or link. It does not check that an address exists or that a link works.
A worked example
Paste this: Contact [email protected], [email protected] or [email protected]. See https://example.com/a?x=1, then www.test.org/page). With duplicates removed, the email list shows two items, [email protected] and [email protected], because the second [email protected] is the same address apart from capital letters. The first spelling you meet is the one kept.
The link list shows https://example.com/a?x=1 and www.test.org/page. Notice what happened at the ends: the comma after the first link and the closing bracket after the second were not included, and the full stop that ended the sentence after shop.co.uk was not treated as part of the email address. These are the punctuation marks people most often type right after a link or address, and the tool strips them from the end.
What counts as an email address
An email is recognised as some letters, digits or the characters dot, underscore, percent, plus and hyphen, then an @ sign, then a domain made of labels separated by dots, ending in a final part of at least two letters. Letters from any language are accepted, so addresses with accented names or international domain names are found. A plus tag such as [email protected] is kept whole.
Because the match works on the surface shape, it also finds things inside other text. In a link such as mailto:[email protected]?subject=hi the address [email protected] is listed as an email. A string that merely looks like an address, for example a version tag like [email protected], is not matched, as the part after the @ must contain a dot followed by letters.
What counts as a link, and what does not
A link is anything that begins with http://, https:// or www. and continues until the next space, angle bracket, quote mark or round bracket. A bare domain such as example.com with no prefix is ignored, and so are mailto: links as links, though the address inside is reported as an email. FTP links and other schemes are not collected.
Round brackets end a link, which matters for addresses that contain them. A web address ending in Foo_(bar) is reported as ending at Foo_. If you work with such addresses, check the end of each item against the original. After the link is cut, trailing full stops, commas, semicolons, colons, exclamation marks, question marks and closing brackets are removed, so a link that really ends in a question mark would lose it.
Duplicates and sorting
With Remove duplicates on, emails are compared without regard to capitals, and the first occurrence is kept. Links are compared exactly, so http://example.com/a and http://example.com/A count as different, and so do a link with and without a trailing slash. This is deliberate, because paths on many servers are case sensitive.
Sort A to Z orders each list alphabetically using the browser's locale rules. With sorting off, items keep the order in which they appear in the text, which is useful when the order carries meaning, for example a reading list.
Common mistakes
The most frequent surprise is expecting every domain to be found. If your text lists sites such as example.com and shop.org with no http or www, the link list will be empty. Add a find-and-replace step, or run the lines through a tool that adds https:// first.
A second mistake is treating the output as a verified list. An address like [email protected] looks fine to the tool even if the domain is misspelled, and a link may point to a page that no longer exists. Before sending anything to the addresses, check them with a proper email verification service or by sending a first, expected message.
Using the results responsibly
Addresses found in a document belong to real people. Using them to send messages that people did not ask for is restricted or illegal in many countries, and even where it is allowed it tends to hurt the sender's reputation. Good uses include cleaning a list you already hold with permission, collecting the links from your own notes, auditing the outbound links of a page you manage, or finding every contact in an old mailbox export you own.
Questions
Is my text uploaded?
No. It is processed in your browser.
Does it find links without http?
Only those starting with www. Bare domain names such as example.com are not picked up.
Can it read a PDF?
Not directly. Use the PDF to text converter first and paste the result.
Is there a limit?
No fixed limit. Very large texts take longer.
Why was a link cut off before the end of the address?
Links stop at the first space, quote, angle bracket or round bracket. Addresses that contain round brackets, such as some wiki pages, will be shortened at the bracket. Compare the result with the original and add the missing end by hand.
Will it find an email address written as name at example dot com?
No. Only text with a real @ sign and a dot in the domain is matched. Addresses spelled out to avoid spam collectors, or hidden in images, will not be found.
Is the case of the address changed in the output?
No. Addresses are listed exactly as they were typed. Case is ignored only when comparing for duplicates, and the first spelling is the one kept.
Can I paste the HTML source of a page?
Yes. Links inside href attributes are found because the quote mark ends the link. Be aware that the page's own scripts, stylesheets and image addresses are collected too, so the link list may be longer than the links you see on the page.